Re: [PATCH V6 11/20] rtla/osnoise: Add the hist mode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH V6 11/20] rtla/osnoise: Add the hist mode
- From: Tao Zhou <tao.zhou@xxxxxxxxx>
- Date: Thu, 28 Oct 2021 06:32:04 +0800
- Cc: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Tom Zanussi <zanussi@xxxxxxxxxx>, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Juri Lelli <juri.lelli@xxxxxxxxxx>, Clark Williams <williams@xxxxxxxxxx>, John Kacur <jkacur@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>, linux-rt-users@xxxxxxxxxxxxxxx, linux-trace-devel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Tao Zhou <tao.zhou@xxxxxxxxx>
- In-reply-to: <20211027142918.487cd143@gandalf.local.home>
- References: <cover.1635284863.git.bristot@kernel.org> <fede3c3805cb7a70bd7c8d60ba2c5ce290cc6e1e.1635284863.git.bristot@kernel.org> <YXmWTOXHYXFduayt@geo.homenetwork> <20211027142918.487cd143@gandalf.local.home>
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]
[Linux USB Development]
[Linux USB Development]
[Linux Audio Users]
[Yosemite Hiking]
[Linux Kernel]
[Linux SCSI]