[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e8011c4b-0fce-c8e5-897b-7b15eba43eaa@linux.vnet.ibm.com>
Date: Thu, 1 Mar 2018 10:40:43 +0530
From: Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
To: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc: peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
namhyung@...nel.org, linux-kernel@...r.kernel.org,
rostedt@...dmis.org, mhiramat@...nel.org,
ananth@...ux.vnet.ibm.com, naveen.n.rao@...ux.vnet.ibm.com,
oleg@...hat.com, Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
Subject: Re: [RFC 0/4] trace_uprobe: Support SDT markers having semaphore
On 02/28/2018 05:36 PM, Srikar Dronamraju wrote:
> * Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com> [2018-02-28 13:23:41]:
>
>> # readelf -n ./tick
>> Provider: tick
>> Name: loop2
>> ... Semaphore: 0x0000000010020036
>>
>> # readelf -SW ./tick | grep probes
>> [25] .probes PROGBITS 0000000010020034 010034
>>
>>
>> Semaphore offset is 0x10036. I don't have educated 'perf probe'
>> about semaphore. So instead of using 'perf probe' command, I'm
>> manually adding entry in the <tracefs>/uprobe_events file.
>> Special char * denotes semaphore offset.
>>
>>
>> # echo "p:sdt_tick/loop2 /tmp/tick:0x6e4 *0x10036" > uprobe_events
>>
>> # perf stat -e sdt_tick:loop2 -- /tmp/tick
>> hi: 0
>> hi: 1
>> hi: 2
>> hi: 3
>> ^C
>> Performance counter stats for '/tmp/tick':
>> 4 sdt_tick:loop2
>> 3.359047827 seconds time elapsed
>>
>>
>> Feedback?
>>
>> TODO:
>> - Educate perf tool about semaphore.
>>
> Is it possible to extend perf buildcache with a new option to work with
> semaphore?
Yes, that should be fairly easy to do. Will add a patch for that.
Thanks for the review,
Ravi
Powered by blists - more mailing lists