All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arun Sharma <asharma@fb.com>
To: Andrew Vagin <avagin@openvz.org>
Cc: <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	<devel@openvz.org>
Subject: Re: [PATCH 3/4] perf: teach perf inject to merge sched_stat_* and sched_switch events
Date: Thu, 3 Nov 2011 17:08:59 -0700	[thread overview]
Message-ID: <4EB32D1B.8060305@fb.com> (raw)
In-Reply-To: <1320274784-2463901-4-git-send-email-avagin@openvz.org>

On 11/2/11 3:59 PM, Andrew Vagin wrote:

> +		event_sw = (union perf_event *)&ent->header;

This causes problems with -Wstrict-aliasing=3.

I noticed that the suggested cmdline is:

perf script record sched-stat -- -e sched:sched_stat_sleep

I'd much prefer something along the lines of:

perf script record sched-stat -e <events> -- sleep 1

Also, the perf inject command is a bit unforgiving when the user makes 
some mistakes (eg: didn't specify -e sched:sched_stat_sleep). The 
failure mode is hard to understand (perf report -i perf.data.d fails 
with "no samples").

Doing it directly:

# perf record -ag -e sched:sched_switch --filter "prev_state == 1 || 
prev_state == 2" -e 
sched:sched_process_exit,sched:sched_stat_sleep,sched:sched_stat_iowait 
-- sleep 1
# perf inject -v -s -i perf.data -o perf.data.d

results in a whole bunch of:

Could not find sched_switch for pid 16188
Could not find sched_switch for pid 16212
Could not find sched_switch for pid 1500
Could not find sched_switch for pid 16195
Could not find sched_switch for pid 16179

I think this is the same issue you referenced in "Known issues".

Although I'm able to get some profiling info out of perf.data.d, the 
process I really wanted to trace got zero samples.

  -Arun


  reply	other threads:[~2011-11-04  0:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02 22:59 [PATCH 0/4] Profiling sleep times Andrew Vagin
2011-11-02 22:59 ` [PATCH 1/4] perf: use event_name() to get an event name Andrew Vagin
2011-11-02 22:59 ` [PATCH 2/4] perf: teach "perf inject" to work with files Andrew Vagin
2011-11-02 22:59 ` [PATCH 3/4] perf: teach perf inject to merge sched_stat_* and sched_switch events Andrew Vagin
2011-11-04  0:08   ` Arun Sharma [this message]
2011-11-07 12:56     ` Andrew Vagin
2011-11-02 22:59 ` [PATCH 4/4] perf: add scripts for profiling sleep times Andrew Vagin
2011-11-03  1:07   ` Arun Sharma

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=4EB32D1B.8060305@fb.com \
    --to=asharma@fb.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=avagin@openvz.org \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.