public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Stephane Eranian <eranian@gmail.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [perf tool] cgroup support broken on Debian?
Date: Mon, 15 Dec 2014 19:01:50 -0300	[thread overview]
Message-ID: <20141215220150.GP9845@kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.11.1412151558550.15380@vincent-weaver-1.umelst.maine.edu>

Em Mon, Dec 15, 2014 at 04:07:46PM -0500, Vince Weaver escreveu:
> Hello
> 
> has anyone tested the perf tool cgroup support recently?
> 
> I was trying to get it working with a command like
> 	sudo perf stat -a -e cycles:u,cycles:u,cycles:u -G systemd -- sleep 1
> 
> and it just failed by unhelfully dumping the "-G" help text.
> Once I added a lot of extra debug printfs to tools/perf/util/cgroup.c 
> things became a little clearer.
> 
> First, you apparently need "perf_event" passed as a mount option to the 
> cgroup or you cannot attach perf to it (should perf be modified to 
> print a warning in this case rather than just printing the unhelpful
> helf text?)

yes, please
 
> Secondly, the cgroup mount point detection completely fails on my debian 
> box.  On my machine /proc/mounts has this:
> 
>   ...
>   none /sys/fs/cgroup tmpfs rw,relatime,size=4k,mode=755 0 0
>   systemd /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,perf_event,name=systemd 0 0
> 
> The current perf code looks for "cgroup" in the type field to find the 
> root cgroupfs tree.  This fails because as seen above on my machine the
> cgroup mount has type tmpfs.  And when it finds
> /sys/fs/cgroup/systemd as the root it tacks the name onto the end
> (/sys/fs/cgroup/systemd/systemd) which obviously doesn't exist.
> 
> Once I hack the code to avoid that I do finally get some cgroup readings.
> 
> I was checking if this was a known problem, a Debian issue, or what...

Its just that the cgroup support is rough, patches are welcome to
improve the situation.

BTW, here its fedora20, same problem:

[root@zoo ~]# mount | grep cgroup
tmpfs on /sys/fs/cgroup type tmpfs
(rw,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup
(rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)

- Arnaldo

  reply	other threads:[~2014-12-15 22:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15 21:07 [perf tool] cgroup support broken on Debian? Vince Weaver
2014-12-15 22:01 ` Arnaldo Carvalho de Melo [this message]
2014-12-15 22:45   ` Stephane Eranian
2014-12-16 17:17     ` Vince Weaver
2014-12-16 17:29       ` Stephane Eranian
2014-12-17  2:20       ` Zefan Li
2014-12-17  2:29         ` Stephane Eranian
2014-12-17  3:02           ` Zefan Li
2014-12-17 16:36             ` Stephane Eranian
2014-12-18  3:40               ` Zefan Li

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=20141215220150.GP9845@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=eranian@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=vincent.weaver@maine.edu \
    /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