Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp891936pxb; Wed, 27 Oct 2021 14:35:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjnkice0lEImL/8Z2a5kinp1XFqErZG5qyw667+SEmwN9ADZswRUID6/nsvzr9Li1KjbPs X-Received: by 2002:a17:907:7209:: with SMTP id dr9mr156319ejc.248.1635370507054; Wed, 27 Oct 2021 14:35:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370507; cv=none; d=google.com; s=arc-20160816; b=RYFjIJ2KdxAxpvQwXpL1bLJ0nKybqweksuWFAv0laFUhy0tQFea5CkTMw48aYnrrBy DogI7pyHslgqpHD10ew+NHwdaP0JtWGV8MLiIMsy8Zx9kPwp07Ge1+5PrYUPsHW2qg4k KDEcNNCGaN41wwP70+JXf7UkSiIhU2AgK9LttDYZFMNRTuMUbK7xUWd4baYRm4uQ4fN3 if2UibMMlP5WjjF41sDinL2WaxWuFstO3BGz4jPf2jFgTJaMKaP7kBdcvJbJpEyqKv/U VxIHd+GjsjcG0Kjh9Ye5xmmWAEqFc7LlhCmAW+/hFe8r60v1fOcQ9ggLX0yFyizxS8vr +YCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=bKBRRYvm3yw8CnCWikUvI0pfm7H0QNuAKez8UuF/+rU=; b=PW0V48p/zrV69LGwAfC7P+K96rfDLsxSYXVYx24IRnmdglEQkTL6E4unlklAweDSFI 0Jx2t3m+bla4uy7IORNtsxZoCoYBNlhhqja50A/kByWHYhaz5MbQ1Ti4VbQwAcbvbuXz L24dVi/kYJN3gl67ptVf2shFjZ7Bhnp/gjI6GXhfymtXbCdc8nSA2iBPq7kSnfkHXCiu On4CRirtX4s6IuYVhQrOgWH4mdcyflTEjCNiQyvJ6ORAXIVYIeSmGPbHPLWGGYuQDhZT dKaGT0sOovBcoAZLcukJIk6yo1ZvqARw4vPZLsAaliVU602FI+lke9PEV+AHULU95yNz fLOA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sb38si1780552ejc.415.2021.10.27.14.34.44; Wed, 27 Oct 2021 14:35:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243564AbhJ0Sbs (ORCPT + 97 others); Wed, 27 Oct 2021 14:31:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:55044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238534AbhJ0Sbs (ORCPT ); Wed, 27 Oct 2021 14:31:48 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 489F26103C; Wed, 27 Oct 2021 18:29:21 +0000 (UTC) Date: Wed, 27 Oct 2021 14:29:18 -0400 From: Steven Rostedt To: Tao Zhou 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 Subject: Re: [PATCH V6 11/20] rtla/osnoise: Add the hist mode Message-ID: <20211027142918.487cd143@gandalf.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)); -- Steve