lkml.org 
[lkml]   [2013]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 3/4] perf tools: Add call-graph option support into .perfconfig
    Date
    On Sat, 26 Oct 2013 16:25:35 +0200, Jiri Olsa wrote:
    > Adding call-graph option support into .perfconfig file,
    > so it's now possible use call-graph option like:
    >
    > [top]
    > call-graph = fp
    >
    > [record]
    > call-graph = dwarf,8192
    >
    > Above options ONLY setup the unwind method. To enable
    > perf record/top to actually use it the command line
    > option -g/-G must be specified.
    >
    > The --call-graph option overloads .perfconfig setup.
    >
    > Assuming above configuration:
    >
    > $ perf record -g ls
    > - enables dwarf unwind with user stack size dump 8192 bytes
    >
    > $ perf top -G
    > - enables frame pointer unwind
    >
    > $ perf record --call-graph=fp ls
    > - enables frame pointer unwind
    >
    > $ perf top --call-graph=dwarf,4096 ls
    > - enables dwarf unwind with user stack size dump 4096 bytes
    >
    [SNIP]
    > --- a/tools/perf/builtin-record.c
    > +++ b/tools/perf/builtin-record.c
    > @@ -750,6 +750,8 @@ int record_parse_callchain_opt(const struct option *opt,
    > struct perf_record_opts *opts = opt->value;
    > int ret;
    >
    > + opts->call_graph_enabled = !unset;
    > +

    Why not just using symbol_conf.use_callchain?

    Thanks,
    Namhyung


    > /* --no-call-graph */
    > if (unset) {
    > opts->call_graph = CALLCHAIN_NONE;
    > @@ -770,6 +772,8 @@ int record_callchain_opt(const struct option *opt,
    > {
    > struct perf_record_opts *opts = opt->value;
    >
    > + opts->call_graph_enabled = !unset;
    > +
    > if (opts->call_graph == CALLCHAIN_NONE)
    > opts->call_graph = CALLCHAIN_FP;
    >
    > @@ -777,6 +781,16 @@ int record_callchain_opt(const struct option *opt,
    > return 0;
    > }


    \
     
     \ /
      Last update: 2013-10-28 09:21    [W:2.683 / U:0.428 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site