Re: [PATCH V6 11/20] rtla/osnoise: Add the hist mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Steven,

On Wed, Oct 27, 2021 at 02:29:18PM -0400, Steven Rostedt wrote:

> On Thu, 28 Oct 2021 02:11:24 +0800
> Tao Zhou <tao.zhou@xxxxxxxxx> wrote:
> 
> > > +	/* one histogram for IRQ and one for thread, per cpu */
> > > +	for (cpu = 0; cpu < nr_cpus; cpu++) {
> > > +		data->hist[cpu].samples = calloc(1, sizeof(*data->hist) * (entries + 1));  
> > 
> > @samples is a pointer to int and used for int array. The "sizeof(*data->hist)"
> > should be "sizeof(int)" or am I totally wrong.
> 
> Or standard approach is: 
> 
> 		data->hist[cpu].samples = calloc(1, sizeof(*data->hist->samples) * (entries + 1));

Right, thanks. I am not totally waken up now. Ha.


> -- Steve



Thanks,
Tao



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux