----- Original Message -----
On 06/18/2012 11:15 PM, Dave Anderson wrote:
>
> ----- Original Message -----
>> Since Linux v3.4 (specifically, commit 438ced1720b584000 "ring-buffer:
>> Add per_cpu ring buffer control files"), the trace buffer size is now
>> per-cpu. The patch below updates the trace extension to handle this.
>>
>> Rabin
It looks very good to me, but for future possible convenience, it would
be better if the buffers[i].nr_pages is also set when !per_cpu_buffer_sizes.
ACK-ed.
Thanks,
Lai
OK thanks -- I have updated Rabin's patch with your additional suggestion.
The updated patch for crash-6.0.8 is attached.
Thanks,
Dave
>> @@ -362,6 +374,10 @@ static int ftrace_init_buffers(struct
>> ring_buffer_per_cpu *buffers,
>> buffer_read_value(reader_page);
>> buffer_read_value(overrun);
>> buffer_read_value(entries);
>> + if (per_cpu_buffer_sizes) {
>> + buffer_read_value(nr_pages);
>> + pages = buffers[i].nr_pages;
>> + }
else {
buffers[i].nr_pages = pages;
}
>> #undef buffer_read_value
>>
>> if (ftrace_init_pages(buffers + i, pages) < 0)
>> --
>> 1.7.9.5
>>