linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Accessing sample data (like period) for trace events from python scripts
@ 2016-08-16 18:42 Milian Wolff
  2016-08-17  3:05 ` Namhyung Kim
  0 siblings, 1 reply; 8+ messages in thread
From: Milian Wolff @ 2016-08-16 18:42 UTC (permalink / raw)
  To: linux-perf-users

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

Hey all,

It doesn't seem to be possible to access the period, tid and various other 
sample fields from a python (and perl?) script using `perf script`. My use-
case would be analyzing a perf data file created by perf inject --sched-stat.

I have hacked something together locally in python_process_tracepoint, but 
wonder what an upstreamable version should look like:

- I simply added the sample data to the dict, like is done in 
python_process_general_event

- Alternatively, one could think of more `common_period(context)` functions. 
If that is preferable, I could add the sample to the scripting_context and 
make that work.

Please advise the path forward, I'm willing to send a patch upstream to make 
it work.

Cheers
-- 
Milian Wolff | milian.wolff@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5903 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-08-23 19:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-16 18:42 Accessing sample data (like period) for trace events from python scripts Milian Wolff
2016-08-17  3:05 ` Namhyung Kim
2016-08-17  8:48   ` Milian Wolff
2016-08-19  1:35     ` Namhyung Kim
2016-08-19  1:51       ` Namhyung Kim
2016-08-20 20:30         ` Milian Wolff
2016-08-23  2:42           ` Namhyung Kim
2016-08-23 19:48             ` Milian Wolff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).