lkml.org 
[lkml]   [2016]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 08/13] perf tools: show kernel overhead
On Fri, Dec 02, 2016 at 04:19:16PM -0500, kan.liang@intel.com wrote:

SNIP

> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> index 02c8f7a..72c4412 100644
> --- a/tools/perf/util/machine.c
> +++ b/tools/perf/util/machine.c
> @@ -557,9 +557,31 @@ int machine__process_switch_event(struct machine *machine __maybe_unused,
>
> int machine__process_overhead_event(struct machine *machine __maybe_unused,
> union perf_event *event,
> - struct perf_sample *sample __maybe_unused)
> -{
> - dump_printf("\tUNSUPPORT TYPE 0x%lx!\n", event->overhead.type);
> + struct perf_sample *sample)
> +{
> + switch (event->overhead.type) {
> + case PERF_PMU_SAMPLE_OVERHEAD:
> + dump_printf(" SAMPLE nr: %llu time: %llu cpu %d\n",
> + event->overhead.entry.nr,
> + event->overhead.entry.time,
> + sample->cpu);
> + break;
> + case PERF_CORE_MUX_OVERHEAD:
> + dump_printf(" MULTIPLEXING nr: %llu time: %llu cpu %d\n",
> + event->overhead.entry.nr,
> + event->overhead.entry.time,
> + sample->cpu);
> + break;
> + case PERF_CORE_SB_OVERHEAD:
> + dump_printf(" SIDE-BAND nr: %llu time: %llu cpu %d\n",
> + event->overhead.entry.nr,
> + event->overhead.entry.time,
> + sample->cpu);
> + break;
> + default:
> + dump_printf("\tUNSUPPORT TYPE 0x%lx!\n", event->overhead.type);
> + return 0;
> + }
> return 0;

normaly we call here perf_event__fprintf handlers, which you're
adding in the following patch.. above code seems redundant

thanks,
jirka

\
 
 \ /
  Last update: 2016-12-06 12:18    [W:0.123 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site