lkml.org 
[lkml]   [2014]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 05/15 V3] perf, c2c: Rework setup code to prepare for features
On Mon, Mar 24, 2014 at 03:36:56PM -0400, Don Zickus wrote:

SNIP

>
> static int perf_c2c__process_load_store(struct perf_c2c *c2c,
> + struct addr_location *al,
> struct perf_sample *sample,
> - struct addr_location *al)
> + struct perf_evsel *evsel)
> {
> - if (c2c->raw_records)
> - perf_sample__fprintf(sample, ' ', "raw input", al, stdout);
> + struct mem_info *mi;
> +
> + mi = sample__resolve_mem(sample, al);
> + if (!mi)
> + return -ENOMEM;

perhaps not directly related to this patchset, but I needed
attached patch to get resolved data in .bss (static), which
for some reason happened to be located in executable segment

I wonder why we need this VARIABLE/FUNCTION separation at all,
I think Arnaldo told me some archs could have same addresses
for data and functions.. will check ;-)

jirka

---
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index d9d86c6..be6d7cf 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1220,6 +1220,10 @@ static void ip__resolve_data(struct machine *machine, struct thread *thread,

thread__find_addr_location(thread, machine, m, MAP__VARIABLE, addr,
&al);
+ if (!al.map)
+ thread__find_addr_location(thread, machine, m, MAP__FUNCTION, addr,
+ &al);
+
ams->addr = addr;
ams->al_addr = al.addr;
ams->sym = al.sym;

\
 
 \ /
  Last update: 2014-03-29 18:21    [W:0.210 / U:7.128 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site