Revert "perf tools: Default to cpu// for events v5"
This reverts commit 50e200f079
("perf tools: Default to cpu// for
events v5")
The fixup cannot handle the case that
new style format(which without //) mixed with
other different formats.
For example,
group events with new style format: {mem-stores,mem-loads}
some hardware event + new style event: cycles,mem-loads
Cache event + new style event: LLC-loads,mem-loads
Raw event + new style event:
cpu/event=0xc8,umask=0x08/,mem-loads
old style event and new stytle mixture: mem-stores,cpu/mem-loads/
Signed-off-by: Kan Liang <kan.liang@intel.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1412694532-23391-2-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
b56d5beff4
commit
42f60c2d63
@@ -357,27 +357,3 @@ void *memdup(const void *src, size_t len)
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
* str_append - reallocate string and append another
|
||||
* @s: pointer to string pointer
|
||||
* @len: pointer to len (initialized)
|
||||
* @a: string to append.
|
||||
*/
|
||||
int str_append(char **s, int *len, const char *a)
|
||||
{
|
||||
int olen = *s ? strlen(*s) : 0;
|
||||
int nlen = olen + strlen(a) + 1;
|
||||
if (*len < nlen) {
|
||||
*len = *len * 2;
|
||||
if (*len < nlen)
|
||||
*len = nlen;
|
||||
*s = realloc(*s, *len);
|
||||
if (!*s)
|
||||
return -ENOMEM;
|
||||
if (olen == 0)
|
||||
**s = 0;
|
||||
}
|
||||
strcat(*s, a);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user