Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182359
b: refs/heads/master
c: cf55311
h: refs/heads/master
i:
  182357: 8ea7f09
  182355: e2fe7d9
  182351: 41703c8
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and Ingo Molnar committed Jan 13, 2010
1 parent 3f1ce6b commit 2beba1e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a89e5abe3efcc7facc666d3985769278937f86b0
refs/heads/master: cf5531148ff34938840d6da775c0a4ace442d573
16 changes: 5 additions & 11 deletions trunk/tools/perf/util/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
#include "thread.h"

static pid_t event__synthesize_comm(pid_t pid, int full,
int (*process)(event_t *event,
struct perf_session *session),
event__handler_t process,
struct perf_session *session)
{
event_t ev;
Expand Down Expand Up @@ -91,8 +90,7 @@ static pid_t event__synthesize_comm(pid_t pid, int full,
}

static int event__synthesize_mmap_events(pid_t pid, pid_t tgid,
int (*process)(event_t *event,
struct perf_session *session),
event__handler_t process,
struct perf_session *session)
{
char filename[PATH_MAX];
Expand Down Expand Up @@ -156,9 +154,7 @@ static int event__synthesize_mmap_events(pid_t pid, pid_t tgid,
return 0;
}

int event__synthesize_thread(pid_t pid,
int (*process)(event_t *event,
struct perf_session *session),
int event__synthesize_thread(pid_t pid, event__handler_t process,
struct perf_session *session)
{
pid_t tgid = event__synthesize_comm(pid, 1, process, session);
Expand All @@ -167,8 +163,7 @@ int event__synthesize_thread(pid_t pid,
return event__synthesize_mmap_events(pid, tgid, process, session);
}

void event__synthesize_threads(int (*process)(event_t *event,
struct perf_session *session),
void event__synthesize_threads(event__handler_t process,
struct perf_session *session)
{
DIR *proc;
Expand Down Expand Up @@ -205,8 +200,7 @@ static int find_symbol_cb(void *arg, const char *name, char type, u64 start)
return 1;
}

int event__synthesize_kernel_mmap(int (*process)(event_t *event,
struct perf_session *session),
int event__synthesize_kernel_mmap(event__handler_t process,
struct perf_session *session,
const char *symbol_name)
{
Expand Down
12 changes: 5 additions & 7 deletions trunk/tools/perf/util/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,13 @@ void event__print_totals(void);

struct perf_session;

int event__synthesize_thread(pid_t pid,
int (*process)(event_t *event,
struct perf_session *session),
typedef int (*event__handler_t)(event_t *event, struct perf_session *session);

int event__synthesize_thread(pid_t pid, event__handler_t process,
struct perf_session *session);
void event__synthesize_threads(int (*process)(event_t *event,
struct perf_session *session),
void event__synthesize_threads(event__handler_t process,
struct perf_session *session);
int event__synthesize_kernel_mmap(int (*process)(event_t *event,
struct perf_session *session),
int event__synthesize_kernel_mmap(event__handler_t process,
struct perf_session *session,
const char *symbol_name);

Expand Down

0 comments on commit 2beba1e

Please sign in to comment.