lkml.org 
[lkml]   [2015]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[tip:perf/core] perf report: Make max_stack value allow for synthesized callchains
    Commit-ID:  188bb5e2ce112463428994f91291e5df6fc05521
    Gitweb: http://git.kernel.org/tip/188bb5e2ce112463428994f91291e5df6fc05521
    Author: Adrian Hunter <adrian.hunter@intel.com>
    AuthorDate: Fri, 25 Sep 2015 16:15:46 +0300
    Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
    CommitDate: Mon, 28 Sep 2015 17:03:20 -0300

    perf report: Make max_stack value allow for synthesized callchains

    perf report has an option (--max-stack) to set the maximum stack depth
    when processing callchains. The option defaults to the hard-coded
    maximum definition PERF_MAX_STACK_DEPTH which is 127. The intention of
    the option is to allow the user to reduce the processing time by
    reducing the amount of the callchain that is processed.

    It is also possible, when processing instruction traces, to synthesize
    callchains. Synthesized callchains do not have the kernel size
    limitation and are whatever size the user requests, although validation
    presently prevents the user requested a value greater that 1024. The
    default value is 16.

    To allow for synthesized callchains, make the max_stack value at least
    the same size as the synthesized callchain size.

    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Link: http://lkml.kernel.org/r/1443186956-18718-16-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ---
    tools/perf/builtin-report.c | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
    index e94e5c7..37c9f51 100644
    --- a/tools/perf/builtin-report.c
    +++ b/tools/perf/builtin-report.c
    @@ -809,6 +809,10 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
    if (report.inverted_callchain)
    callchain_param.order = ORDER_CALLER;

    + if (itrace_synth_opts.callchain &&
    + (int)itrace_synth_opts.callchain_sz > report.max_stack)
    + report.max_stack = itrace_synth_opts.callchain_sz;
    +
    if (!input_name || !strlen(input_name)) {
    if (!fstat(STDIN_FILENO, &st) && S_ISFIFO(st.st_mode))
    input_name = "-";

    \
     
     \ /
      Last update: 2015-09-29 11:01    [W:4.194 / U:0.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site