Commit ce90c12d authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo

Merge branch 'perf/urgent' into perf/core, to pick up fixes before merging new changes

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parents b6a32f02 de737f33
...@@ -8,7 +8,11 @@ void *memdup(const void *src, size_t len); ...@@ -8,7 +8,11 @@ void *memdup(const void *src, size_t len);
int strtobool(const char *s, bool *res); int strtobool(const char *s, bool *res);
#ifdef __GLIBC__ /*
* glibc based builds needs the extern while uClibc doesn't.
* However uClibc headers also define __GLIBC__ hence the hack below
*/
#if defined(__GLIBC__) && !defined(__UCLIBC__)
extern size_t strlcpy(char *dest, const char *src, size_t size); extern size_t strlcpy(char *dest, const char *src, size_t size);
#endif #endif
......
...@@ -507,17 +507,17 @@ static int __perf_evsel__hw_cache_name(u64 config, char *bf, size_t size) ...@@ -507,17 +507,17 @@ static int __perf_evsel__hw_cache_name(u64 config, char *bf, size_t size)
u8 op, result, type = (config >> 0) & 0xff; u8 op, result, type = (config >> 0) & 0xff;
const char *err = "unknown-ext-hardware-cache-type"; const char *err = "unknown-ext-hardware-cache-type";
if (type > PERF_COUNT_HW_CACHE_MAX) if (type >= PERF_COUNT_HW_CACHE_MAX)
goto out_err; goto out_err;
op = (config >> 8) & 0xff; op = (config >> 8) & 0xff;
err = "unknown-ext-hardware-cache-op"; err = "unknown-ext-hardware-cache-op";
if (op > PERF_COUNT_HW_CACHE_OP_MAX) if (op >= PERF_COUNT_HW_CACHE_OP_MAX)
goto out_err; goto out_err;
result = (config >> 16) & 0xff; result = (config >> 16) & 0xff;
err = "unknown-ext-hardware-cache-result"; err = "unknown-ext-hardware-cache-result";
if (result > PERF_COUNT_HW_CACHE_RESULT_MAX) if (result >= PERF_COUNT_HW_CACHE_RESULT_MAX)
goto out_err; goto out_err;
err = "invalid-cache"; err = "invalid-cache";
......
...@@ -66,7 +66,7 @@ static int entry(u64 ip, struct unwind_info *ui) ...@@ -66,7 +66,7 @@ static int entry(u64 ip, struct unwind_info *ui)
if (__report_module(&al, ip, ui)) if (__report_module(&al, ip, ui))
return -1; return -1;
e->ip = ip; e->ip = al.addr;
e->map = al.map; e->map = al.map;
e->sym = al.sym; e->sym = al.sym;
......
...@@ -542,7 +542,7 @@ static int entry(u64 ip, struct thread *thread, ...@@ -542,7 +542,7 @@ static int entry(u64 ip, struct thread *thread,
thread__find_addr_location(thread, PERF_RECORD_MISC_USER, thread__find_addr_location(thread, PERF_RECORD_MISC_USER,
MAP__FUNCTION, ip, &al); MAP__FUNCTION, ip, &al);
e.ip = ip; e.ip = al.addr;
e.map = al.map; e.map = al.map;
e.sym = al.sym; e.sym = al.sym;
......
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