Commit fc9ea5a1 authored by Ingo Molnar's avatar Ingo Molnar

Merge branch 'perf/core' of...

Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
parents 61be7fde 9da79ab8
...@@ -925,14 +925,17 @@ static int create_trace_probe(int argc, char **argv) ...@@ -925,14 +925,17 @@ static int create_trace_probe(int argc, char **argv)
pr_info("Delete command needs an event name.\n"); pr_info("Delete command needs an event name.\n");
return -EINVAL; return -EINVAL;
} }
mutex_lock(&probe_lock);
tp = find_probe_event(event, group); tp = find_probe_event(event, group);
if (!tp) { if (!tp) {
mutex_unlock(&probe_lock);
pr_info("Event %s/%s doesn't exist.\n", group, event); pr_info("Event %s/%s doesn't exist.\n", group, event);
return -ENOENT; return -ENOENT;
} }
/* delete an event */ /* delete an event */
unregister_trace_probe(tp); unregister_trace_probe(tp);
free_trace_probe(tp); free_trace_probe(tp);
mutex_unlock(&probe_lock);
return 0; return 0;
} }
......
...@@ -1082,26 +1082,6 @@ static void event__process_sample(const event_t *self, ...@@ -1082,26 +1082,6 @@ static void event__process_sample(const event_t *self,
} }
} }
static int event__process(event_t *event, struct perf_session *session)
{
switch (event->header.type) {
case PERF_RECORD_COMM:
event__process_comm(event, session);
break;
case PERF_RECORD_MMAP:
event__process_mmap(event, session);
break;
case PERF_RECORD_FORK:
case PERF_RECORD_EXIT:
event__process_task(event, session);
break;
default:
break;
}
return 0;
}
struct mmap_data { struct mmap_data {
int counter; int counter;
void *base; void *base;
......
...@@ -151,7 +151,6 @@ static int event__synthesize_mmap_events(pid_t pid, pid_t tgid, ...@@ -151,7 +151,6 @@ static int event__synthesize_mmap_events(pid_t pid, pid_t tgid,
continue; continue;
pbf += n + 3; pbf += n + 3;
if (*pbf == 'x') { /* vm_exec */ if (*pbf == 'x') { /* vm_exec */
u64 vm_pgoff;
char *execname = strchr(bf, '/'); char *execname = strchr(bf, '/');
/* Catch VDSO */ /* Catch VDSO */
...@@ -162,12 +161,7 @@ static int event__synthesize_mmap_events(pid_t pid, pid_t tgid, ...@@ -162,12 +161,7 @@ static int event__synthesize_mmap_events(pid_t pid, pid_t tgid,
continue; continue;
pbf += 3; pbf += 3;
n = hex2u64(pbf, &vm_pgoff); n = hex2u64(pbf, &ev.mmap.pgoff);
/* pgoff is in bytes, not pages */
if (n >= 0)
ev.mmap.pgoff = vm_pgoff << getpagesize();
else
ev.mmap.pgoff = 0;
size = strlen(execname); size = strlen(execname);
execname[size - 1] = '\0'; /* Remove \n */ execname[size - 1] = '\0'; /* Remove \n */
...@@ -554,6 +548,26 @@ int event__process_task(event_t *self, struct perf_session *session) ...@@ -554,6 +548,26 @@ int event__process_task(event_t *self, struct perf_session *session)
return 0; return 0;
} }
int event__process(event_t *event, struct perf_session *session)
{
switch (event->header.type) {
case PERF_RECORD_COMM:
event__process_comm(event, session);
break;
case PERF_RECORD_MMAP:
event__process_mmap(event, session);
break;
case PERF_RECORD_FORK:
case PERF_RECORD_EXIT:
event__process_task(event, session);
break;
default:
break;
}
return 0;
}
void thread__find_addr_map(struct thread *self, void thread__find_addr_map(struct thread *self,
struct perf_session *session, u8 cpumode, struct perf_session *session, u8 cpumode,
enum map_type type, pid_t pid, u64 addr, enum map_type type, pid_t pid, u64 addr,
......
...@@ -154,6 +154,7 @@ int event__process_comm(event_t *self, struct perf_session *session); ...@@ -154,6 +154,7 @@ int event__process_comm(event_t *self, struct perf_session *session);
int event__process_lost(event_t *self, struct perf_session *session); int event__process_lost(event_t *self, struct perf_session *session);
int event__process_mmap(event_t *self, struct perf_session *session); int event__process_mmap(event_t *self, struct perf_session *session);
int event__process_task(event_t *self, struct perf_session *session); int event__process_task(event_t *self, struct perf_session *session);
int event__process(event_t *event, struct perf_session *session);
struct addr_location; struct addr_location;
int event__preprocess_sample(const event_t *self, struct perf_session *session, int event__preprocess_sample(const event_t *self, struct perf_session *session,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment