mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
perf tools: Switch to tracing_path interface on appropriate places
Using tracing_path interface on several places, that more or less copy the functionality of tracing_path interface. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Raphael Beamonte <raphael.beamonte@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1441180605-24737-16-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
60a1133a5b
commit
fbf99625b8
4 changed files with 11 additions and 39 deletions
|
@ -1261,23 +1261,11 @@ test__checkevent_breakpoint_len_rw_modifier(struct perf_evlist *evlist)
|
|||
|
||||
static int count_tracepoints(void)
|
||||
{
|
||||
char events_path[PATH_MAX];
|
||||
struct dirent *events_ent;
|
||||
const char *mountpoint;
|
||||
DIR *events_dir;
|
||||
int cnt = 0;
|
||||
|
||||
mountpoint = tracefs__mountpoint();
|
||||
if (mountpoint) {
|
||||
scnprintf(events_path, PATH_MAX, "%s/events",
|
||||
mountpoint);
|
||||
} else {
|
||||
mountpoint = debugfs__mountpoint();
|
||||
scnprintf(events_path, PATH_MAX, "%s/tracing/events",
|
||||
mountpoint);
|
||||
}
|
||||
|
||||
events_dir = opendir(events_path);
|
||||
events_dir = opendir(tracing_events_path);
|
||||
|
||||
TEST_ASSERT_VAL("Can't open events dir", events_dir);
|
||||
|
||||
|
@ -1294,7 +1282,7 @@ static int count_tracepoints(void)
|
|||
continue;
|
||||
|
||||
scnprintf(sys_path, PATH_MAX, "%s/%s",
|
||||
events_path, events_ent->d_name);
|
||||
tracing_events_path, events_ent->d_name);
|
||||
|
||||
sys_dir = opendir(sys_path);
|
||||
TEST_ASSERT_VAL("Can't open sys dir", sys_dir);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue