[lkml]   [2017]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectPort the period data column to centos6.7 for perf script
Hi, all.
I want to draw off-cpu flamegraph using perf script on centos6.7
(kernel version, 2.6.32-573), and I found perf script lacks the
period data column on that version. I found two related patches,
and modifed builin-script.c in reference to those patches.
perf script:Add period data column authorJiri Olsa 2014-08-25 16:45:42 +0200
perf script: Add period as a default output column

I used the new complied perf to record some hardware event, like cycles,
and the result displays the period data column. But when I record some
tracepoint events, like sched:sched_stat_sleep, sched:sched_switch, I
found the period data column is always 1. I checked the code(kernel/event/core.c),
and found that the data->period is assigned nr in the function named perf_swevent_event.
I tracked this function, and found the function call flow:

The function perf_trace_buf_submit is in the ftrace_event.h files, so the period data
column for tracepoint events is calulated in the frace subsystem? What is the real
meaning of the period field and how to calculate it ? Can you give me some tips for
poring this field on the old kernel?

Wind Yu.

 \ /
  Last update: 2017-09-15 04:39    [W:0.052 / U:0.016 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site