Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1399349 > unrolled thread
| Started by | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| First post | 2016-05-11 18:40 +0200 |
| Last post | 2016-05-12 09:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[GIT PULL 00/13] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-11 18:40 +0200
[PATCH 11/13] perf tools: Use SBUILD_ID_SIZE where applicable Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-11 18:40 +0200
Re: [GIT PULL 00/13] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-05-12 09:00 +0200
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-05-11 18:40 +0200 |
| Subject | [GIT PULL 00/13] perf/core improvements and fixes |
| Message-ID | <rxFl0-3u1-3@gated-at.bofh.it> |
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Hi Ingo,
Please consider pulling,
- Arnaldo
The following changes since commit 38f5d8b32f36bcac1f54d4511a81e02ed8771a29:
Merge tag 'perf-core-for-mingo-20160510' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-05-11 16:56:58 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160511
for you to fetch changes up to d65444d2fba98dcd4fa028ffada39c36a46f0038:
perf buildid-cache: Use lsdir() for looking up buildid caches (2016-05-11 13:06:08 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
User visible:
- Fix symbol insertion and callchain behavior in db-export (Chris Phlipot)
Infrastructure:
- Add libunwind build test (feature query), working towards supporting
cross-platform DWARF callchains, starting with arm/arm64 (He Kuang)
- Use lsdir() more extensively (Masami Hiramatsu)
- Use SBUILD_ID_SIZE in places where the equivalent expression was
being used (Masami Hiramatsu)
- Split some more 'perf trace' syscall arg beautifiers (Arnaldo Carvalho de Melo)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Arnaldo Carvalho de Melo (3):
perf scripting python: Use Py_FatalError instead of die()
perf trace: Move flock op beautifier to tools/perf/trace/beauty/
perf trace: Move seccomp args beautifiers to tools/perf/trace/beauty/
Chris Phlipot (4):
perf symbols: Add dso__insert_symbol function
perf script: Fix symbol insertion behavior in db-export
perf script: Fix callchain addresses in db-export
perf script: Fix export of callchains with recursion in db-export
He Kuang (2):
perf build: Add build-test for libunwind cross-platforms support
perf build: Add build-test for debug-frame on arm/arm64
Masami Hiramatsu (4):
perf tools: Fix lsdir to set errno correctly
perf tools: Use SBUILD_ID_SIZE where applicable
perf symbols: Use lsdir() for the search in kcore cache directory
perf buildid-cache: Use lsdir() for looking up buildid caches
tools/build/Makefile.feature | 8 +-
tools/build/feature/Makefile | 23 ++++++
tools/build/feature/test-libunwind-aarch64.c | 26 +++++++
tools/build/feature/test-libunwind-arm.c | 27 +++++++
.../feature/test-libunwind-debug-frame-aarch64.c | 16 ++++
.../build/feature/test-libunwind-debug-frame-arm.c | 16 ++++
tools/build/feature/test-libunwind-x86.c | 27 +++++++
tools/build/feature/test-libunwind-x86_64.c | 27 +++++++
tools/perf/builtin-trace.c | 85 +---------------------
tools/perf/trace/beauty/flock.c | 31 ++++++++
tools/perf/trace/beauty/seccomp.c | 52 +++++++++++++
tools/perf/util/annotate.c | 2 +-
tools/perf/util/build-id.c | 30 +-------
tools/perf/util/db-export.c | 12 +--
tools/perf/util/dso.c | 4 +-
tools/perf/util/header.c | 2 +-
tools/perf/util/map.c | 2 +-
.../util/scripting-engines/trace-event-python.c | 9 ++-
tools/perf/util/symbol.c | 40 ++++++----
tools/perf/util/symbol.h | 3 +
tools/perf/util/util.c | 2 +-
21 files changed, 306 insertions(+), 138 deletions(-)
create mode 100644 tools/build/feature/test-libunwind-aarch64.c
create mode 100644 tools/build/feature/test-libunwind-arm.c
create mode 100644 tools/build/feature/test-libunwind-debug-frame-aarch64.c
create mode 100644 tools/build/feature/test-libunwind-debug-frame-arm.c
create mode 100644 tools/build/feature/test-libunwind-x86.c
create mode 100644 tools/build/feature/test-libunwind-x86_64.c
create mode 100644 tools/perf/trace/beauty/flock.c
create mode 100644 tools/perf/trace/beauty/seccomp.c
[toc] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-05-11 18:40 +0200 |
| Subject | [PATCH 11/13] perf tools: Use SBUILD_ID_SIZE where applicable |
| Message-ID | <rxFl2-3u1-59@gated-at.bofh.it> |
| In reply to | #1399349 |
From: Masami Hiramatsu <mhiramat@kernel.org>
Use the existing SBUILD_ID_SIZE macro instead of the equivalent
BUILD_ID_SIZE * 2 + 1 expression for allocating a buffer for build-id
strings.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20160511135159.23943.57120.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/annotate.c | 2 +-
tools/perf/util/dso.c | 4 ++--
tools/perf/util/header.c | 2 +-
tools/perf/util/map.c | 2 +-
tools/perf/util/scripting-engines/trace-event-python.c | 2 +-
tools/perf/util/symbol.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index d4b3d034c503..4db73d5a0dbc 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1138,7 +1138,7 @@ fallback:
if (dso->symtab_type == DSO_BINARY_TYPE__KALLSYMS &&
!dso__is_kcore(dso)) {
- char bf[BUILD_ID_SIZE * 2 + 16] = " with build id ";
+ char bf[SBUILD_ID_SIZE + 15] = " with build id ";
char *build_id_msg = NULL;
if (dso->annotate_warned)
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 8e6395439ca0..3357479082ca 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -38,7 +38,7 @@ int dso__read_binary_type_filename(const struct dso *dso,
enum dso_binary_type type,
char *root_dir, char *filename, size_t size)
{
- char build_id_hex[BUILD_ID_SIZE * 2 + 1];
+ char build_id_hex[SBUILD_ID_SIZE];
int ret = 0;
size_t len;
@@ -1301,7 +1301,7 @@ size_t __dsos__fprintf(struct list_head *head, FILE *fp)
size_t dso__fprintf_buildid(struct dso *dso, FILE *fp)
{
- char sbuild_id[BUILD_ID_SIZE * 2 + 1];
+ char sbuild_id[SBUILD_ID_SIZE];
build_id__sprintf(dso->build_id, sizeof(dso->build_id), sbuild_id);
return fprintf(fp, "%s", sbuild_id);
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index c6000d44f98c..08852dde1378 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1474,7 +1474,7 @@ static int __event_process_build_id(struct build_id_event *bev,
dso = machine__findnew_dso(machine, filename);
if (dso != NULL) {
- char sbuild_id[BUILD_ID_SIZE * 2 + 1];
+ char sbuild_id[SBUILD_ID_SIZE];
dso__set_build_id(dso, &bev->build_id);
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 02c31865648b..b19bcd3b7128 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -289,7 +289,7 @@ int map__load(struct map *map, symbol_filter_t filter)
nr = dso__load(map->dso, map, filter);
if (nr < 0) {
if (map->dso->has_build_id) {
- char sbuild_id[BUILD_ID_SIZE * 2 + 1];
+ char sbuild_id[SBUILD_ID_SIZE];
build_id__sprintf(map->dso->build_id,
sizeof(map->dso->build_id),
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 73ee12d96c33..ff134700bf30 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -618,7 +618,7 @@ static int python_export_dso(struct db_export *dbe, struct dso *dso,
struct machine *machine)
{
struct tables *tables = container_of(dbe, struct tables, dbe);
- char sbuild_id[BUILD_ID_SIZE * 2 + 1];
+ char sbuild_id[SBUILD_ID_SIZE];
PyObject *t;
build_id__sprintf(dso->build_id, sizeof(dso->build_id), sbuild_id);
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 21af8e8891fe..4ada5a44aaf2 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1642,7 +1642,7 @@ static int find_matching_kcore(struct map *map, char *dir, size_t dir_sz)
static char *dso__find_kallsyms(struct dso *dso, struct map *map)
{
u8 host_build_id[BUILD_ID_SIZE];
- char sbuild_id[BUILD_ID_SIZE * 2 + 1];
+ char sbuild_id[SBUILD_ID_SIZE];
bool is_host = false;
char path[PATH_MAX];
--
2.5.5
[toc] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2016-05-12 09:00 +0200 |
| Message-ID | <rxSLg-mB-15@gated-at.bofh.it> |
| In reply to | #1399349 |
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > From: Arnaldo Carvalho de Melo <acme@redhat.com> > > Hi Ingo, > > Please consider pulling, > > - Arnaldo > > The following changes since commit 38f5d8b32f36bcac1f54d4511a81e02ed8771a29: > > Merge tag 'perf-core-for-mingo-20160510' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-05-11 16:56:58 +0200) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160511 > > for you to fetch changes up to d65444d2fba98dcd4fa028ffada39c36a46f0038: > > perf buildid-cache: Use lsdir() for looking up buildid caches (2016-05-11 13:06:08 -0300) > > ---------------------------------------------------------------- > perf/core improvements and fixes: > > User visible: > > - Fix symbol insertion and callchain behavior in db-export (Chris Phlipot) > > Infrastructure: > > - Add libunwind build test (feature query), working towards supporting > cross-platform DWARF callchains, starting with arm/arm64 (He Kuang) > > - Use lsdir() more extensively (Masami Hiramatsu) > > - Use SBUILD_ID_SIZE in places where the equivalent expression was > being used (Masami Hiramatsu) > > - Split some more 'perf trace' syscall arg beautifiers (Arnaldo Carvalho de Melo) > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> > > ---------------------------------------------------------------- > Arnaldo Carvalho de Melo (3): > perf scripting python: Use Py_FatalError instead of die() > perf trace: Move flock op beautifier to tools/perf/trace/beauty/ > perf trace: Move seccomp args beautifiers to tools/perf/trace/beauty/ > > Chris Phlipot (4): > perf symbols: Add dso__insert_symbol function > perf script: Fix symbol insertion behavior in db-export > perf script: Fix callchain addresses in db-export > perf script: Fix export of callchains with recursion in db-export > > He Kuang (2): > perf build: Add build-test for libunwind cross-platforms support > perf build: Add build-test for debug-frame on arm/arm64 > > Masami Hiramatsu (4): > perf tools: Fix lsdir to set errno correctly > perf tools: Use SBUILD_ID_SIZE where applicable > perf symbols: Use lsdir() for the search in kcore cache directory > perf buildid-cache: Use lsdir() for looking up buildid caches > > tools/build/Makefile.feature | 8 +- > tools/build/feature/Makefile | 23 ++++++ > tools/build/feature/test-libunwind-aarch64.c | 26 +++++++ > tools/build/feature/test-libunwind-arm.c | 27 +++++++ > .../feature/test-libunwind-debug-frame-aarch64.c | 16 ++++ > .../build/feature/test-libunwind-debug-frame-arm.c | 16 ++++ > tools/build/feature/test-libunwind-x86.c | 27 +++++++ > tools/build/feature/test-libunwind-x86_64.c | 27 +++++++ > tools/perf/builtin-trace.c | 85 +--------------------- > tools/perf/trace/beauty/flock.c | 31 ++++++++ > tools/perf/trace/beauty/seccomp.c | 52 +++++++++++++ > tools/perf/util/annotate.c | 2 +- > tools/perf/util/build-id.c | 30 +------- > tools/perf/util/db-export.c | 12 +-- > tools/perf/util/dso.c | 4 +- > tools/perf/util/header.c | 2 +- > tools/perf/util/map.c | 2 +- > .../util/scripting-engines/trace-event-python.c | 9 ++- > tools/perf/util/symbol.c | 40 ++++++---- > tools/perf/util/symbol.h | 3 + > tools/perf/util/util.c | 2 +- > 21 files changed, 306 insertions(+), 138 deletions(-) > create mode 100644 tools/build/feature/test-libunwind-aarch64.c > create mode 100644 tools/build/feature/test-libunwind-arm.c > create mode 100644 tools/build/feature/test-libunwind-debug-frame-aarch64.c > create mode 100644 tools/build/feature/test-libunwind-debug-frame-arm.c > create mode 100644 tools/build/feature/test-libunwind-x86.c > create mode 100644 tools/build/feature/test-libunwind-x86_64.c > create mode 100644 tools/perf/trace/beauty/flock.c > create mode 100644 tools/perf/trace/beauty/seccomp.c Pulled, thanks a lot Arnaldo! Ingo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web