lkml.org 
[lkml]   [2012]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subject[BUG] perf tools: does not process data mmaps correctly
From
Arnaldo,

A long time ago, I brought up the issue of perf failing to resolve
data symbols despite having the MAP__VARIABLE map type.

Now that I have posted the PEBS-LL patch series, there is a test
case to debug this.

I looked again at it today. Start from ip__resolve_data() in my patchset.
IT is looking for a data symbol given an address.

Seems to me the core of the problem is how perf processes the MMAP
records in machine__process_mmap_event():

int machine__process_mmap_event(struct machine *machine, union
perf_event *event)
{
...

thread = machine__findnew_thread(machine, event->mmap.pid);
if (thread == NULL)
goto out_problem;
map = map__new(&machine->user_dsos, event->mmap.start,
event->mmap.len, event->mmap.pgoff,
event->mmap.pid, event->mmap.filename,
MAP__FUNCTION);

I don't see any effort to distinguish code from data here. All mmaps are
treated as code.

That could be fine, if then you drop MAP__VARIABLE.

So how is this supposed to work?

Thanks.


\
 
 \ /
  Last update: 2012-10-30 23:21    [W:0.039 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site