public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Milian Wolff <milian.wolff@kdab.com>
To: linux-perf-users@vger.kernel.org
Subject: Callgraph access from python script
Date: Mon, 28 Sep 2015 19:12:27 +0200	[thread overview]
Message-ID: <1869251.rcBbvGpItz@milian-kdab2> (raw)

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

Hey all,

This was asked before, but I still cannot find any good documentation on the 
matter. How does one access the callgraph from a python script generated by 
perf script? The export-to-postgresql.py seems to indicate that this feature 
was added, but the code is too convoluted for me to grasp.

Looking at the code for trace-event-python.c I see that there is a 
common_callchain, but I don't get such code generate:

perf record --call-graph dwarf kwrite
perf script -g python

the result is: https://paste.kde.org/p0uazuubi

Note how the `while ((event = trace_find_next_event(pevent, event)))` loop has 
not triggered any output. The reason is that pevent is NULL - where is that 
supposed to be set when looking at builtin-script.c?

Can someone explain me what I'm doing wrong? Can someone reproduce the odd 
behavior above?
-- 
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 --]

             reply	other threads:[~2015-09-28 17:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28 17:12 Milian Wolff [this message]
2015-09-28 21:08 ` Callgraph access from python script Milian Wolff
2015-09-28 21:32   ` Milian Wolff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1869251.rcBbvGpItz@milian-kdab2 \
    --to=milian.wolff@kdab.com \
    --cc=linux-perf-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox