Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp934798pxb; Wed, 27 Oct 2021 15:33:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYEXKzubfFt2lOCayTyhCrSM0g7+FqX8aU4k8gOsIaAnXAwA4KsLH3Sm5mT4tBeEv44TC/ X-Received: by 2002:a17:90a:a88e:: with SMTP id h14mr8775882pjq.41.1635374022287; Wed, 27 Oct 2021 15:33:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635374022; cv=none; d=google.com; s=arc-20160816; b=PWhSTYVIRTnY3C41EK0usAqyjkWt1l/FFEHVBmrMyz5zxXgKzTqM3EUwEVfKMIahGb IkdGiK5QRzYsJx8Jo5YE4sSwVj17v1tfJbaE69TMHn247DPJRq+mQsED6LRWBN5tUeym BkeQWpuSUzk1iAJAFclfKUkQzAgqtKXj5b0XBqCBb87HLegt0LPs/+aCnx/CgeldxslN PJjZj6EKsDG6btATeS7McUtpKCWnQW8y/TR96sIlDPNi2Z18t0C9MZ4IYy9Fcy+lD7fl bEZg5bB+qMAxWItv/7ExQn61cVXSabKJvOngpoNGrEKD6ceRJw4FtHk5vOcXx/3a5j8b l2gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=1YpDIAFQroCs85/1499wmm57xbIl4RrWHQOPQ/kVnTU=; b=eu5DSK4J6NR6Q2/8yqqavZSjgjvkTaw8s3F9IENTvspTQrmQi5jyS6LiX7Y4ofksTZ SEfLEaNQThBF1TyKkPyIyOfcNYxPq3Vgn+QMqgnBQuWE0hyLVGu2BYW2A0v22uvGkSr7 jo99vypFiuKNKDP7bg7zXjA6mxCh/MoIlwMDJwePHuYlS38P028mjhwmsxAvyJgcRma7 t2CRM6B5C09/mSZue5RkLen7ILUDKZ6tPEH5QgMiUKlr4NHbpbrkikYiVBeCUMRWSvoz b7lyJt+oio0mtGER2QUNSjFciJD9PEigrM8PxQx0rwxBUDGw+VJqp21syxEtNt3MmzQz Tdzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=UqAN9U2I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f22si1935024pfe.333.2021.10.27.15.33.29; Wed, 27 Oct 2021 15:33:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=UqAN9U2I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229744AbhJ0Wdw (ORCPT + 99 others); Wed, 27 Oct 2021 18:33:52 -0400 Received: from out2.migadu.com ([188.165.223.204]:12575 "EHLO out2.migadu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbhJ0Wdw (ORCPT ); Wed, 27 Oct 2021 18:33:52 -0400 Date: Thu, 28 Oct 2021 06:32:04 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1635373883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1YpDIAFQroCs85/1499wmm57xbIl4RrWHQOPQ/kVnTU=; b=UqAN9U2I1eMhCNdkuX7HJugkJRrcFTfLLLbYVv8Q6OuxzseZd7U3DSWeqVyMXNHokJGLTZ QbL3XOVYQU1UbU3bdXq7t9gNlT9BbLNEtADnvX90XFU7e1OTk6sejwEWkIjp53Uq8cEfsG F2cH6Ku/984w0SK1tp/BUpItxE5njIg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Tao Zhou To: Steven Rostedt Cc: Daniel Bristot de Oliveira , Ingo Molnar , Tom Zanussi , Masami Hiramatsu , Juri Lelli , Clark Williams , John Kacur , Peter Zijlstra , Thomas Gleixner , Sebastian Andrzej Siewior , linux-rt-users@vger.kernel.org, linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Tao Zhou Subject: Re: [PATCH V6 11/20] rtla/osnoise: Add the hist mode Message-ID: References: <20211027142918.487cd143@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211027142918.487cd143@gandalf.local.home> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: tao.zhou@linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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