On Fri, Dec 02, 2016 at 04:19:16PM -0500, [email protected] 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

Reply via email to