lkml.org 
[lkml]   [2014]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 02/22] perf evlist: Add initial support for mmapping an Instruction Trace buffer
On 25/11/14 18:57, Jiri Olsa wrote:
> On Thu, Nov 20, 2014 at 03:23:08PM +0200, Adrian Hunter wrote:
>
> SNIP
>
>> + bool per_cpu __maybe_unused)
>> +{
>> +}
>> +
>> static void __perf_evlist__munmap(struct perf_evlist *evlist, int idx)
>> {
>> if (evlist->mmap[idx].base != NULL) {
>> @@ -731,6 +759,7 @@ static void __perf_evlist__munmap(struct perf_evlist *evlist, int idx)
>> evlist->mmap[idx].base = NULL;
>> evlist->mmap[idx].refcnt = 0;
>> }
>> + itrace_mmap__munmap(&evlist->mmap[idx].itrace_mmap);
>> }
>>
>> void perf_evlist__munmap(struct perf_evlist *evlist)
>> @@ -758,6 +787,7 @@ static int perf_evlist__alloc_mmap(struct perf_evlist *evlist)
>> struct mmap_params {
>> int prot;
>> int mask;
>> + struct itrace_mmap_params itrace_mp;
>> };
>>
>> static int __perf_evlist__mmap(struct perf_evlist *evlist, int idx,
>> @@ -788,6 +818,10 @@ static int __perf_evlist__mmap(struct perf_evlist *evlist, int idx,
>> return -1;
>> }
>>
>> + if (itrace_mmap__mmap(&evlist->mmap[idx].itrace_mmap,
>> + &mp->itrace_mp, evlist->mmap[idx].base, fd))
>> + return -1;
>> +
>
> so the itrace mmap is mmaped with right after event mmap for event fd..?

The AUX area support is not implemented yet. The AUX mmap size and offset
are set through the mmap page via aux_offset and aux_size.

> is there any latest version of kernel changes, so I could check with
> kernel's perf_mmap? hum.. or you just use the same mmap?

I re-based and pushed to:

git://git.infradead.org/users/ahunter/linux-perf.git

The missing AUX bits are added in this patch:

http://git.infradead.org/users/ahunter/linux-perf.git/commitdiff/f1be40371b5600a5c4a20f88adff9595bdf5e7ec



\
 
 \ /
  Last update: 2014-11-26 14:41    [W:0.050 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site