diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-12-10 19:11:43 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-12-10 19:11:43 +0100 |
commit | a60d79535c21dca4e24d08abf8ab56e2f860af71 (patch) | |
tree | 4887c99890bc49809cf02c8ac7fd75d7b9b942e5 /tools/perf/tests/util.c | |
parent | perf test: Fixup error reporting in basic mmap test (diff) | |
download | linux-a60d79535c21dca4e24d08abf8ab56e2f860af71.tar.xz linux-a60d79535c21dca4e24d08abf8ab56e2f860af71.zip |
perf test: Use perf_evsel__newtp constructor in the tracepoint tests
Removing one trace_event__id function, not used anymore.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-13p2ov2rg166y73j9uazukma@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/util.c')
-rw-r--r-- | tools/perf/tests/util.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tools/perf/tests/util.c b/tools/perf/tests/util.c deleted file mode 100644 index 748f2e8f6961..000000000000 --- a/tools/perf/tests/util.c +++ /dev/null @@ -1,30 +0,0 @@ -#include <stdio.h> -#include <unistd.h> -#include <stdlib.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include "tests.h" -#include "debugfs.h" - -int trace_event__id(const char *evname) -{ - char *filename; - int err = -1, fd; - - if (asprintf(&filename, - "%s/syscalls/%s/id", - tracing_events_path, evname) < 0) - return -1; - - fd = open(filename, O_RDONLY); - if (fd >= 0) { - char id[16]; - if (read(fd, id, sizeof(id)) > 0) - err = atoi(id); - close(fd); - } - - free(filename); - return err; -} |