diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-01-26 12:50:29 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-01-26 12:50:29 +0300 |
commit | b844ff366f06a2bcecfbd053b4d4a472e670dec8 (patch) | |
tree | d12a79636ae246a3b895af031f2e7d55cb6e194d /tools/perf/util/dso.c | |
parent | f575494d4a610278ea8597f2f798c8431b94e884 (diff) | |
parent | 76a06125dd57ed2c7559410168b543313fa0cc51 (diff) | |
download | linux-b844ff366f06a2bcecfbd053b4d4a472e670dec8.tar.xz |
Merge tag 'perf-core-for-mingo-5.0-20190126' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
BPF:
Song Liu:
- Fix synthesized PERF_RECORD_KSYMBOL/BPF_EVENT
Arnaldo Carvalho de Melo:
- Add bpf_map() helper, to make BPF map declararions more compact and
allow for BTF annotations to be made transparently.
perf script python:
Tony Jones:
- Remove explicit shebangs.
- Fix the PYTHON=python3 builds.
Core:
Davidlohr Bueso:
- Update rbtree implementation, getting it closer to the kernel one.
- Use cached rbtrees.
Arnaldo Carvalho de Melo:
- Remove some needless headers from .c and .h files fixing up the fallout,
to reduce building time when changes are made to .h files
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/dso.c')
-rw-r--r-- | tools/perf/util/dso.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index 62c8cf622607..a8a54115b115 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -8,7 +8,9 @@ #include <unistd.h> #include <errno.h> #include <fcntl.h> +#include <libgen.h> #include "compress.h" +#include "namespaces.h" #include "path.h" #include "symbol.h" #include "srcline.h" @@ -1195,10 +1197,10 @@ struct dso *dso__new(const char *name) strcpy(dso->name, name); dso__set_long_name(dso, dso->name, false); dso__set_short_name(dso, dso->name, false); - dso->symbols = dso->symbol_names = RB_ROOT; + dso->symbols = dso->symbol_names = RB_ROOT_CACHED; dso->data.cache = RB_ROOT; - dso->inlined_nodes = RB_ROOT; - dso->srclines = RB_ROOT; + dso->inlined_nodes = RB_ROOT_CACHED; + dso->srclines = RB_ROOT_CACHED; dso->data.fd = -1; dso->data.status = DSO_DATA_STATUS_UNKNOWN; dso->symtab_type = DSO_BINARY_TYPE__NOT_FOUND; @@ -1467,7 +1469,7 @@ size_t dso__fprintf(struct dso *dso, FILE *fp) ret += fprintf(fp, "%sloaded, ", dso__loaded(dso) ? "" : "NOT "); ret += dso__fprintf_buildid(dso, fp); ret += fprintf(fp, ")\n"); - for (nd = rb_first(&dso->symbols); nd; nd = rb_next(nd)) { + for (nd = rb_first_cached(&dso->symbols); nd; nd = rb_next(nd)) { struct symbol *pos = rb_entry(nd, struct symbol, rb_node); ret += symbol__fprintf(pos, fp); } |