Merge remote-tracking branch 'tip/perf/urgent' into perf/core
To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -1081,6 +1081,7 @@ void *cpu_map_data__alloc(struct cpu_map *map, size_t *size, u16 *type, int *max
|
||||
}
|
||||
|
||||
*size += sizeof(struct cpu_map_data);
|
||||
*size = PERF_ALIGN(*size, sizeof(u64));
|
||||
return zalloc(*size);
|
||||
}
|
||||
|
||||
@@ -1560,26 +1561,9 @@ struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
|
||||
|
||||
return NULL;
|
||||
}
|
||||
try_again:
|
||||
|
||||
al->map = map_groups__find(mg, al->addr);
|
||||
if (al->map == NULL) {
|
||||
/*
|
||||
* If this is outside of all known maps, and is a negative
|
||||
* address, try to look it up in the kernel dso, as it might be
|
||||
* a vsyscall or vdso (which executes in user-mode).
|
||||
*
|
||||
* XXX This is nasty, we should have a symbol list in the
|
||||
* "[vdso]" dso, but for now lets use the old trick of looking
|
||||
* in the whole kernel symbol list.
|
||||
*/
|
||||
if (cpumode == PERF_RECORD_MISC_USER && machine &&
|
||||
mg != &machine->kmaps &&
|
||||
machine__kernel_ip(machine, al->addr)) {
|
||||
mg = &machine->kmaps;
|
||||
load_map = true;
|
||||
goto try_again;
|
||||
}
|
||||
} else {
|
||||
if (al->map != NULL) {
|
||||
/*
|
||||
* Kernel maps might be changed when loading symbols so loading
|
||||
* must be done prior to using kernel maps.
|
||||
|
@@ -1089,6 +1089,9 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
|
||||
attr->exclude_user = 1;
|
||||
}
|
||||
|
||||
if (evsel->own_cpus)
|
||||
evsel->attr.read_format |= PERF_FORMAT_ID;
|
||||
|
||||
/*
|
||||
* Apply event specific term settings,
|
||||
* it overloads any global configuration.
|
||||
|
@@ -930,13 +930,14 @@ static void pmu_format_value(unsigned long *format, __u64 value, __u64 *v,
|
||||
|
||||
static __u64 pmu_format_max_value(const unsigned long *format)
|
||||
{
|
||||
__u64 w = 0;
|
||||
int fbit;
|
||||
int w;
|
||||
|
||||
for_each_set_bit(fbit, format, PERF_PMU_FORMAT_BITS)
|
||||
w |= (1ULL << fbit);
|
||||
|
||||
return w;
|
||||
w = bitmap_weight(format, PERF_PMU_FORMAT_BITS);
|
||||
if (!w)
|
||||
return 0;
|
||||
if (w < 64)
|
||||
return (1ULL << w) - 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -85,6 +85,9 @@ static struct symbol *new_inline_sym(struct dso *dso,
|
||||
struct symbol *inline_sym;
|
||||
char *demangled = NULL;
|
||||
|
||||
if (!funcname)
|
||||
funcname = "??";
|
||||
|
||||
if (dso) {
|
||||
demangled = dso__demangle_sym(dso, 0, funcname);
|
||||
if (demangled)
|
||||
|
Reference in New Issue
Block a user