Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp270969pxb; Fri, 29 Oct 2021 09:32:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOAg2BGIIqkpo2Ozgz+DAXQf24ww08U7bx/yz+Hg/RL4qFCjJm+Q+FZLGq2zDFue8UOpVP X-Received: by 2002:a05:6e02:19cc:: with SMTP id r12mr8246257ill.277.1635525135228; Fri, 29 Oct 2021 09:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635525135; cv=none; d=google.com; s=arc-20160816; b=wk6PQeMdZxBYcqkY8wT5WbNQSP9xxGG07suq7TY9AJA8tCDDQCeV+xk0oxkX9cRpap Z6s/1+5EBhYTrer11aRNQMjrxwpsVNh2444ZtfZw5eewnzpGF7ITsHN3iXQJVw+3S1Ny 7XooDDhxBXgduF9o55w2bnQLxg+JMpmeNd8SMV64eOa2z70cRUpEwMoUvqMcJUJbDg1M peS6TF/T3lmlHozDQ02F4rf4C7TgaCVyibNuZxhoi4JTmLZ108ITP0qGO0HLGiA7Ky0d vHphZxCiwh4NAm/l03i3N8WoqnhkevDNbjFaug6UkWdXz0K8rD4A6/qa6qAmDd1D5JAP chNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=2OVGcJfsWq0LdWk3L5I+od7BqP/x2w4mLGl+XiS1Yig=; b=YgPWaSKLT3Zo/8RIuhFn7ewfbjDcHNCIAxtRaeiFH6kIhBn0aardR6KboQJaDjivRf mCsWLM1uK0IG8P0czaFT31ZeVcIeG2K6Kn5Nk+2YYyU49J1M+8PWpwXnGCJymPapq2C7 EGUbIrhkEFcuOVtD/KRyRg1165oax64MmxTfMwjigvCIlbJtHp2eCYmCAiIjNwMqvqHz e6a0afv4heu3jO4XNL5Myt8/hDmVGO2LBqo/jicUPd6k6X3z18emqJHWc8ZDZJwjNoXs aCV0s3d3qrk233Y67GvcF5xdJ9+dnt7Rkxj61IQLELEYaVh2hZS+GILreyG/k/UsqRxC heWw== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g20si1568987ilr.45.2021.10.29.09.31.51; Fri, 29 Oct 2021 09:32:15 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230075AbhJ2Qbl (ORCPT + 99 others); Fri, 29 Oct 2021 12:31:41 -0400 Received: from gateway20.websitewelcome.com ([192.185.68.24]:40132 "EHLO gateway20.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbhJ2Qbl (ORCPT ); Fri, 29 Oct 2021 12:31:41 -0400 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway20.websitewelcome.com (Postfix) with ESMTP id DCAEF400D85E3 for ; Fri, 29 Oct 2021 11:04:20 -0500 (CDT) Received: from gator4132.hostgator.com ([192.185.4.144]) by cmsmtp with SMTP id gUMem0wIPG0jLgUMem5KVK; Fri, 29 Oct 2021 11:04:20 -0500 X-Authority-Reason: nr=8 Received: from host-79-27-6-113.retail.telecomitalia.it ([79.27.6.113]:40440 helo=[10.0.0.44]) by gator4132.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1mgUMd-001U4B-MR; Fri, 29 Oct 2021 11:04:19 -0500 Message-ID: <7c4174c7-350d-7922-b82e-862c5fa7477b@kernel.org> Date: Fri, 29 Oct 2021 18:04:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH V6 11/20] rtla/osnoise: Add the hist mode Content-Language: en-US To: Steven Rostedt , Tao Zhou Cc: 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 References: <20211027142918.487cd143@gandalf.local.home> From: Daniel Bristot de Oliveira In-Reply-To: <20211027142918.487cd143@gandalf.local.home> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4132.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - kernel.org X-BWhitelist: no X-Source-IP: 79.27.6.113 X-Source-L: No X-Exim-ID: 1mgUMd-001U4B-MR X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: host-79-27-6-113.retail.telecomitalia.it ([10.0.0.44]) [79.27.6.113]:40440 X-Source-Auth: kernel@bristot.me X-Email-Count: 15 X-Source-Cap: YnJpc3RvdG1lO2JyaXN0b3RtZTtnYXRvcjQxMzIuaG9zdGdhdG9yLmNvbQ== X-Local-Domain: no Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/27/21 20:29, 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)); Fixed in the next version, thanks! -- Daniel