[Crash-utility] [PATCH] Update trace extension for per-cpu buffer size

Dave Anderson anderson at redhat.com
Tue Jun 19 13:07:29 UTC 2012



----- 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
> >>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trace.patch2
Type: text/x-patch
Size: 1824 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120619/3381a966/attachment.bin>


More information about the Crash-utility mailing list