lkml.org 
[lkml]   [2009]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] perf_counter: detect debugfs location

On Tue, 21 Jul 2009, Ray Lee wrote:

> On Tue, Jul 21, 2009 at 9:20 AM, Jason Baron <jbaron@redhat.com> wrote:
> >
> > Search for the debugfs filesystem in /proc/mounts, but also allows the user to
> > specify '--debugfs-dir=blah' or set the environment variable: 'PERF_DIR_DEBUGFS'
>
> > -static char default_debugfs_path[] = "/sys/kernel/debug/tracing/events";
>
> There are server systems out there that run with thousands of mounts.
> It would be kinder to the users of those systems (ie, faster perf
> startup) if you only went rooting around /proc/mounts if opening the
> default location failed.

Well, those that have thousand of mounts could probably get away with
setting PERF_DIR_DEBUGFS in /etc/profile.

But, a simple stat("/sys/kernel/debug/tracing") should be easy enough.

-- Steve



\
 
 \ /
  Last update: 2009-07-21 18:47    [W:0.044 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site