lkml.org 
[lkml]   [2013]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 11/18] perf tools: add mem access sampling core support
On Wed, Mar 27, 2013 at 03:14:25PM +0100, Jiri Olsa wrote:
> On Thu, Jan 24, 2013 at 04:10:35PM +0100, Stephane Eranian wrote:
>
> SNIP
>
> >
> > +static void ip__resolve_data(struct machine *self, struct thread *thread,
> > + u8 m,
> > + struct addr_map_symbol *ams,
> > + u64 addr)
> > +{
> > + struct addr_location al;
> > +
> > + memset(&al, 0, sizeof(al));
> > +
> > + thread__find_addr_location(thread, self, m, MAP__VARIABLE, addr, &al,
> > + NULL);
> > + ams->addr = addr;
> > + ams->al_addr = al.addr;
> > + ams->sym = al.sym;
> > + ams->map = al.map;
> > +}
> > +
> > +struct mem_info *machine__resolve_mem(struct machine *self,
> > + struct thread *thr,
> > + struct perf_sample *sample,
> > + u8 cpumode)
> > +{
> > + struct mem_info *mi;
> > +
> > + mi = calloc(1, sizeof(struct mem_info));
> > + if (!mi)
> > + return NULL;
> > +
> > + ip__resolve_ams(self, thr, &mi->iaddr, sample->ip);
> > + ip__resolve_data(self, thr, cpumode, &mi->daddr, sample->addr);
>
> question, should this be the other way around? like:
>
> ip__resolve_ams(machine, thr, &mi->daddr, sample->addr);
> ip__resolve_data(machine, thr, cpumode, &mi->iaddr, sample->ip);

ugh, I missed the MAP__VARIABLE/MAP__FUNCTION difference there, thanks Arnaldo! ;-)

still, no need to guess the cpumode for ip and guess it for data?

jirka


\
 
 \ /
  Last update: 2013-03-27 16:21    [W:0.060 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site