summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/trace-event-parse.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-09-11 12:12:54 +0200
committerIngo Molnar <mingo@elte.hu>2009-09-13 10:22:37 +0200
commitec156764d424dd67283c2cd5e9f6f1b8388364ac (patch)
treec7c4e20d64f70cfd2167c73963e2437dee4c3d53 /tools/perf/util/trace-event-parse.c
parent0a02ad9331dd4db56c29c60db2e99c4daaad8a48 (diff)
downloadop-kernel-dev-ec156764d424dd67283c2cd5e9f6f1b8388364ac.zip
op-kernel-dev-ec156764d424dd67283c2cd5e9f6f1b8388364ac.tar.gz
perf sched: Import schedbench.c
Import the schedbench.c tool that i wrote some time ago to simulate scheduler behavior but never finished. It's a good basis for perf sched nevertheless. Most of its guts are not hooked up to the perf event loop yet - that will be done in the patches to come. Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/trace-event-parse.c')
-rw-r--r--tools/perf/util/trace-event-parse.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 629e602..16cf2d5 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -1799,7 +1799,7 @@ static int get_common_info(const char *type, int *offset, int *size)
return 0;
}
-static int parse_common_type(void *data)
+int trace_parse_common_type(void *data)
{
static int type_offset;
static int type_size;
@@ -1832,7 +1832,7 @@ static int parse_common_pid(void *data)
return read_size(data + pid_offset, pid_size);
}
-static struct event *find_event(int id)
+struct event *trace_find_event(int id)
{
struct event *event;
@@ -2420,8 +2420,8 @@ get_return_for_leaf(int cpu, int cur_pid, unsigned long long cur_func,
int type;
int pid;
- type = parse_common_type(next->data);
- event = find_event(type);
+ type = trace_parse_common_type(next->data);
+ event = trace_find_event(type);
if (!event)
return NULL;
@@ -2502,8 +2502,8 @@ print_graph_entry_leaf(struct event *event, void *data, struct record *ret_rec)
int type;
int i;
- type = parse_common_type(ret_rec->data);
- ret_event = find_event(type);
+ type = trace_parse_common_type(ret_rec->data);
+ ret_event = trace_find_event(type);
field = find_field(ret_event, "rettime");
if (!field)
@@ -2696,9 +2696,9 @@ void print_event(int cpu, void *data, int size, unsigned long long nsecs,
nsecs -= secs * NSECS_PER_SEC;
usecs = nsecs / NSECS_PER_USEC;
- type = parse_common_type(data);
+ type = trace_parse_common_type(data);
- event = find_event(type);
+ event = trace_find_event(type);
if (!event)
die("ug! no event found for type %d", type);
OpenPOWER on IntegriCloud