Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1500167

[PATCH 5/9] perf/jit: do not assume pgoff is zero

From Stephane Eranian <eranian@google.com>
Newsgroups linux.kernel
Subject [PATCH 5/9] perf/jit: do not assume pgoff is zero
Date 2016-10-13 13:10 +0200
Message-ID <srM3E-2I3-31@gated-at.bofh.it> (permalink)
References <srM3D-2I3-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Stefano Sanfilippo <ssanfilippo@chromium.org>

When calculating .eh_frame_hdr base and LUT offsets do not
always assume that pgoff is zero.

The assumption is false for DSOs built from the jitdump by
perf inject, because the ELF header did not exist in memory at
sampling time.

Signed-off-by: Stefano Sanfilippo <ssanfilippo@chromium.org>
Signed-off-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Stephane Eranian <eranian@google.com>
---
 tools/perf/util/unwind-libunwind-local.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index 20c2e5743903..6fec84dff3f7 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -357,8 +357,8 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
 		di.format   = UNW_INFO_FORMAT_REMOTE_TABLE;
 		di.start_ip = map->start;
 		di.end_ip   = map->end;
-		di.u.rti.segbase    = map->start + segbase;
-		di.u.rti.table_data = map->start + table_data;
+		di.u.rti.segbase    = map->start + segbase - map->pgoff;
+		di.u.rti.table_data = map->start + table_data - map->pgoff;
 		di.u.rti.table_len  = fde_count * sizeof(struct table_entry)
 				      / sizeof(unw_word_t);
 		ret = dwarf_search_unwind_table(as, ip, &di, pi,
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/9] perf/jit: various improvements Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
  [PATCH 1/9] perf/jit: improve error messages from JVMTI Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
    Re: [PATCH 1/9] perf/jit: improve error messages from JVMTI Nilay Vaish <nilayvaish@gmail.com> - 2016-10-13 22:30 +0200
      Re: [PATCH 1/9] perf/jit: improve error messages from JVMTI Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-14 13:20 +0200
        Re: [PATCH 1/9] perf/jit: improve error messages from JVMTI Stephane Eranian <eranian@google.com> - 2016-10-14 15:30 +0200
          Re: [PATCH 1/9] perf/jit: improve error messages from JVMTI Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-14 17:30 +0200
            Re: [PATCH 1/9] perf/jit: improve error messages from JVMTI Stephane Eranian <eranian@google.com> - 2016-10-17 16:00 +0200
    [tip:perf/core] perf jit: Improve error messages from JVMTI tip-bot for Stephane Eranian <tipbot@zytor.com> - 2016-10-24 21:10 +0200
  [PATCH 5/9] perf/jit: do not assume pgoff is zero Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
    [tip:perf/core] perf jit: Do not assume pgoff is zero tip-bot for Stefano Sanfilippo <tipbot@zytor.com> - 2016-10-24 21:10 +0200
  [PATCH 8/9] perf/jit: Check JITHEADER_VERSION Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
    [tip:perf/core] perf jit: Check JITHEADER_VERSION tip-bot for Stefano Sanfilippo <tipbot@zytor.com> - 2016-10-24 21:10 +0200
  [PATCH 3/9] perf/jit: remove unecessary padding in jitdump file Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
    [tip:perf/core] perf jit: Remove unecessary padding in jitdump file tip-bot for Stephane Eranian <tipbot@zytor.com> - 2016-10-24 21:00 +0200
  [PATCH 6/9] perf/jit: add unwinding support Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
    [tip:perf/core] perf jit: Add unwinding support tip-bot for Stefano Sanfilippo <tipbot@zytor.com> - 2016-10-24 21:10 +0200
  [PATCH 2/9] perf/jit: enable jitdump support without dwarf Stephane Eranian <eranian@google.com> - 2016-10-13 13:10 +0200
    Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-13 20:20 +0200
      Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-13 21:00 +0200
        Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-13 21:20 +0200
          Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-13 21:50 +0200
      Re: [PATCH 2/9] perf/jit: enable jitdump support without dwarf Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-13 21:40 +0200
    [tip:perf/core] perf jit: Enable jitdump support without dwarf tip-bot for Maciej Debski <tipbot@zytor.com> - 2016-10-24 21:00 +0200

csiph-web