Re: [PATCH V6 02/25] perf evlist: Add initial support for mmapping an AUX area buffer

From: Adrian Hunter
Date: Tue Mar 31 2015 - 05:12:04 EST


On 24/03/15 13:07, Jiri Olsa wrote:
> On Mon, Mar 16, 2015 at 02:41:24PM +0200, Adrian Hunter wrote:
>
> SNIP
>
>> index 8d0b623..3cc7815 100644
>> --- a/tools/perf/util/evlist.c
>> +++ b/tools/perf/util/evlist.c
>> @@ -725,6 +725,34 @@ void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx)
>> perf_evlist__mmap_put(evlist, idx);
>> }
>>
>> +int __weak auxtrace_mmap__mmap(struct auxtrace_mmap *mm __maybe_unused,
>> + struct auxtrace_mmap_params *mp __maybe_unused,
>> + void *userpg __maybe_unused,
>> + int fd __maybe_unused)
>> +{
>> + return 0;
>> +}
>> +
>> +void __weak auxtrace_mmap__munmap(struct auxtrace_mmap *mm __maybe_unused)
>> +{
>> +}
>> +
>> +void __weak auxtrace_mmap_params__init(
>> + struct auxtrace_mmap_params *mp __maybe_unused,
>> + off_t auxtrace_offset __maybe_unused,
>> + unsigned int auxtrace_pages __maybe_unused,
>> + bool auxtrace_overwrite __maybe_unused)
>> +{
>> +}
>> +
>> +void __weak auxtrace_mmap_params__set_idx(
>> + struct auxtrace_mmap_params *mp __maybe_unused,
>> + struct perf_evlist *evlist __maybe_unused,
>> + int idx __maybe_unused,
>> + bool per_cpu __maybe_unused)
>> +{
>> +}
>
> IMO it's better to place the weak auxtrace_* functions in auxtrace header

They are there for python extension linking.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/