perf evsel: Handle hw breakpoints event names in perf_evsel__name()
Adding hw breakpoint events hook in the perf_evsel__name function, to display event names properly all over the perf tools. Updated hw breakpoints events tests. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Jovi Zhang <bookjovi@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1340918329-3012-3-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
7582732f57
commit
287e74aa3d
@@ -418,7 +418,6 @@ int parse_events_add_breakpoint(struct list_head **list, int *idx,
|
||||
void *ptr, char *type)
|
||||
{
|
||||
struct perf_event_attr attr;
|
||||
char name[MAX_NAME_LEN];
|
||||
|
||||
memset(&attr, 0, sizeof(attr));
|
||||
attr.bp_addr = (unsigned long) ptr;
|
||||
@@ -437,8 +436,7 @@ int parse_events_add_breakpoint(struct list_head **list, int *idx,
|
||||
|
||||
attr.type = PERF_TYPE_BREAKPOINT;
|
||||
|
||||
snprintf(name, MAX_NAME_LEN, "mem:%p:%s", ptr, type ? type : "rw");
|
||||
return add_event(list, idx, &attr, name);
|
||||
return add_event(list, idx, &attr, NULL);
|
||||
}
|
||||
|
||||
static int config_term(struct perf_event_attr *attr,
|
||||
|
Reference in New Issue
Block a user