linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnab <arnabjyotikalita35@gmail.com>
To: linux-perf-users@vger.kernel.org
Subject: Modify the output of perf script
Date: Fri, 1 Dec 2017 20:26:40 -0500	[thread overview]
Message-ID: <37e8d06f-a1c2-e85f-7ba8-03d0e7f2ae52@gmail.com> (raw)

Hello,

I have been using IntelPT and perf-kvm to collect guest VM generated PT 
packets from the host. I use the below command to record the IntelPT 
traces :-

./perf kvm --guest -guestkallsyms=~/guest-kallsyms 
-guestmodules=~/guest-modules -e intel_pt//

I am using the latest stable Linux kernel version that is 4.14.3 and I 
am using an Ubuntu 17.04 machine running on architecture x86_64.

The above command works fine and is giving me the correct outputs as I 
expect. Now I am trying to see the raw trace dump using perf script -D

./perf script -D -i perf.data.guest

I see all the event records and all their outputs correctly. But what I 
wanted was to make perf script only display me the events corresponding 
to IntelPT trace packets.

This means that I am especially not interested in events like 
PERF_RECORD_COMM and PERF_RECORD_FORK etc and even 
PERF_RECORD_MMAP/PERF_RECORD_MMAP2. I only want perf script to display 
me the raw trace packets under PERF_RECORD_AUXTRACE.

There are obviously two cases here which I have so far considered but 
have not been able to get anywhere :

1. I have tried making perf record stop recording events, which I do not 
want like PERF_RECORD_MMAP, PERF_RECORD_FORK etc. I have been 
unsuccessful and I also think this is not the right approach.

2. The other approach that I have tried is making perf script -D to not 
print the MMAP and FORK events instead but keep recording them. I have 
not been able to do this as I have not been able to trace back in the 
linux-kernel code where the actual print is happening. This looks 
correct and probably easier to achieve.

How can I achieve one of the two goals stated above ? How can I make 
perf script dump me exactly what I want ?

Thanks and Regards,
Arnab

                 reply	other threads:[~2017-12-02  1:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=37e8d06f-a1c2-e85f-7ba8-03d0e7f2ae52@gmail.com \
    --to=arnabjyotikalita35@gmail.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;
as well as URLs for NNTP newsgroup(s).