linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Milian Wolff <milian.wolff@kdab.com>
To: linux-perf-users@vger.kernel.org
Subject: perf sleep time profiling: no sched_stat_sleep events?
Date: Sat, 13 Aug 2016 00:13:37 +0200	[thread overview]
Message-ID: <4191950.GXAFRqVoOG@agathebauer> (raw)

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

Hey all,

sending this here in the hope that it may guide people in avoiding this issue 
in the future:

I have encountered an issue with a recent Arch Linux Kernel (4.7), where the 
the perf script to profile sleep times did not produce any output.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
perf top -e "sched:sched_stat_*"
# wait for some time
0 sched:sched_stat_wait
0 sched:sched_stat_sleep
0 sched:sched_stat_iowait
0 sched:sched_stat_blocked
4K sched:sched_stat_runtime  

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The culprit is 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cat /proc/sys/kernel/sched_schedstats
0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Setting that to 1 enables the sched_stat trace points and makes the script 
work again as needed.

I wonder: Could perf print a warning when the user tries to trace these events 
but they are not enabled?

Thanks

-- 
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:[~2016-08-12 22:13 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=4191950.GXAFRqVoOG@agathebauer \
    --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;
as well as URLs for NNTP newsgroup(s).