lkml.org 
[lkml]   [2015]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] perf: Make perf aware of tracefs
On Sat, Jan 24, 2015 at 01:13:35PM -0500, Steven Rostedt wrote:

SNIP

> @@ -351,11 +385,15 @@ const char *find_tracing_dir(void)
> if (tracing_found)
> return tracing;
>
> - debugfs = find_debugfs();
> - if (!debugfs)
> - return NULL;
> + debugfs = find_tracefs();
> + if (!debugfs) {
> + tracing_dir = "/tracing";
> + debugfs = find_debugfs();
> + if (!debugfs)
> + return NULL;

so this pattern 'try tracefs, if that does not work try debugfs'
is all over the patch.. how about we add new new 'virtual' fs to
encapsulate that, like:

with followign interface:
bool tpfs_configured(void);
const char *tpfs_find_mountpoint(void);
int tpfs_valid_mountpoint(const char *debugfs);
char *tpfs_mount(const char *mountpoint);
extern char tpfs_mountpoint[];

It does not neceserily needs to reside in tools/lib/api/fs/tpfs.[ch],
but I believe we need some form of encapsulation for this.

jirka


\
 
 \ /
  Last update: 2015-01-25 18:41    [W:0.103 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site