RE: [PATCH V2 09/13] perf script: show kernel overhead

From: Liang, Kan
Date: Mon Dec 05 2016 - 09:47:49 EST


> On Fri, Dec 02, 2016 at 04:19:17PM -0500, kan.liang@xxxxxxxxx wrote:
> > From: Kan Liang <kan.liang@xxxxxxxxx>
> >
> > Shows kernel overhead in perf script.
> >
> > The output is as below:
> >
> > perf script --show-profiling-cost-events
> > perf 29001 79989.093958: 1 cycles:
> > ffffffff81064ca6 native_write_msr (/lib/
> > sleep 29001 79989.094282: 7661 cycles:
> > ffffffff810dc433 update_blocked_averages
> > sleep 29001 79989.094294: 7442 cycles:
> > ffffffff81810f60 irq_work_interrupt (/li
> > sleep 29001 79989.094305: 25466 cycles:
> > ffffffff813ca410 radix_tree_next_chunk (
> > sleep 29001 79989.094340: 94368 cycles:
> > ffffffff8180fa90 page_fault (/lib/module
> > sleep 29001 79989.094459: 167362 cycles:
> > ffffffff811e3f79 alloc_set_pte (/lib/mod
> > sleep 29001 79989.094672: 190283 cycles:
> > 7f5d7c91d8e7 _dl_addr (/usr/lib64/li
> > sleep 29001 79991.094978: 194526 cycles:
> > ffffffff811e0579 __tlb_remove_page_size.
> > sleep 29001 79991.095061: PERF_RECORD_OVERHEAD [SAMPLE] nr:
> 8
> > time: 28110
> > sleep 29001 79991.095062: PERF_RECORD_OVERHEAD [SB] nr: 24
> > time: 41397
>
> hi,
> got segfault by running:
>
> [jolsa@ibm-x3650m4-01 perf]$ catchsegv ./perf --no-pager script --show-
> profiling-cost-events
>

Thanks for the testing.

I only test it with kernel overhead event, but not redo the test after
adding the user overhead event. :(
The user overhead event doesn't have sample. So it's not supported for now.

The patch as below will fix it. I will include the fix in V3.

BTW: perf script patch is a stand along patch. It would not impact other patches.
I think you can still play with the rest of V2 patches.

Thanks,
Kan

------