Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp138644pxa; Tue, 11 Aug 2020 20:13:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcbeqoRZ/7qG8YDH61jDwEs5i9RFPAgiFfoI024bjtiJBYOiphnpAVtFgbLTI+t9hGbh9W X-Received: by 2002:a17:906:6cd:: with SMTP id v13mr14668009ejb.307.1597202020268; Tue, 11 Aug 2020 20:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597202020; cv=none; d=google.com; s=arc-20160816; b=Saz79qW5b+pPCPTkxCBDzHRMCzE2z64TiD3MVETQ/DnAxnZk9wJAehflYjYF/X8swN PbXs3vdkIMU/h7rsskxqoAQTfBwhRzSk1kS1XqcsjJSljHvgF3xvTMttBnW2SeDIAVV7 RnlzkaYKBNfu+RenJ468WjHIA5LIDMmuob/iVcXgc3idaxl+E+uK6p4WtBp2enH/k4cX GBD+poRlZ6u1wx/UVTGRf0ly+dKfebULmE6phm3t2blgphv1WGi/GcfVh7kzkx1NN7vU tmj/ltgkkfJ6dWLuAifgqdtPhjPPe+YVRSaYxLN6CNbHABWg5UM/tsFLM5VmA4BudZEH ljfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=QvRwyqfBzSBusxVG0abxrCHTZbe0s1N2buN7nWa0Szc=; b=ow4iJpQVNDwKQYPpMmknnqpXc2hQyQudkDNNow7yQflPFuUNe2ldGaqC9Yfu30ZQSy 82wHXw8lUmQn+wdIobVDPDh631nPUyUGJd80j8Pw/HSzDt/eK7C4HnYAjoz4NXl5sN6l 1cx1FFnH+ASSYp/H0YnIdk89kkg+AUlnMiyuectwOtrpIkY/g4Wq/oEhr3NhXJ80CEs+ avqqGgFR8sA/TtvgpEKbUxgUeEud4EhUC0IgLMenvlSsoVkZXt/baEH+PZQM9/mLc7TA jHpGrkViO3Pom+/kUbiwip53e4Q5t7roY2tn4KZ7ne/1Saua3Wt3XS/qP7BzCR3Sgvf/ ++Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XwJrziSc; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h18si440832edw.184.2020.08.11.20.13.17; Tue, 11 Aug 2020 20:13:40 -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=@gmail.com header.s=20161025 header.b=XwJrziSc; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726542AbgHLDMQ (ORCPT + 99 others); Tue, 11 Aug 2020 23:12:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726255AbgHLDMQ (ORCPT ); Tue, 11 Aug 2020 23:12:16 -0400 Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DECAAC06174A for ; Tue, 11 Aug 2020 20:12:15 -0700 (PDT) Received: by mail-ot1-x343.google.com with SMTP id e11so863467otk.4 for ; Tue, 11 Aug 2020 20:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QvRwyqfBzSBusxVG0abxrCHTZbe0s1N2buN7nWa0Szc=; b=XwJrziScHTqWx9Fqu0aY4Ltd+VHIGc9aInW0KHF02tjHpDykR7F9RT3l+pfey+BrcL CZ+JWyi3mWH8jy2QrdcDsFYWCoV+FJ3ZGjOPSPqeUaaI7MVpNVw5rhOey4+FgNFN5nz3 W41p9wLK45Z6mxrejE73sgsub05gUF/KRvfCYu7BcNDNYOrEPiy7wZSlU2jCrjkltfb/ u3kM3ug6xbXTA9Cd/UuNeXZiC6z8bgwhOTpkhdFTo3RMfNprtky4Vu0dgndCLez3N9Me UmvgYaKpalSCc2NDLXshPYD37THkMxL+AB+EUocm96NmdkiH42niPjOVH+aG45PLEIPl 5KsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QvRwyqfBzSBusxVG0abxrCHTZbe0s1N2buN7nWa0Szc=; b=RNADek4hs9ErRdp8PRojrM+JNg1GWZltRGw836+WGbo/X9vUilwAtT+RpJn1feu7E2 8mAlxhaYdiRXjNCfXcYZElKXQRqvvFf9cE5faFBmL0z6m9iowQ4GTQKHTxAMHfa+7m5b CcrP1hbXHNiMa5BnV14f56zOESI/THORs5O6wV4Sgx+HAUl3eRsWf93UjJi5/etB5c/C 4eONL9poDmlsn7zuE7bIeOtA/1A5GXmz8wNGrDMAFCKX09k87pJnmgCFaZ8S3kT5taHA q1NV4S/aS3UxEZ2tRqbocgRQ/xbo1hXCgKJvbVB4kYqR4K15mFN8l7LVUDQuVymfjxiu K9Qg== X-Gm-Message-State: AOAM530/exJzDt+dNG3wUIBKh7LN/IgDo+A5YFEnDfmNlGNCPW7lW5vh Ivrx3LVjSbabyUjpi+NSBGU= X-Received: by 2002:a9d:b82:: with SMTP id 2mr7537873oth.202.1597201935255; Tue, 11 Aug 2020 20:12:15 -0700 (PDT) Received: from Davids-MacBook-Pro.local ([2601:282:803:7700:c1d8:5dca:975d:16e]) by smtp.googlemail.com with ESMTPSA id d19sm225767oig.8.2020.08.11.20.12.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Aug 2020 20:12:14 -0700 (PDT) Subject: Re: [PATCH 2/2] perf sched timehist: Fix use of CPU list with summary option To: Namhyung Kim , David Ahern Cc: Arnaldo Carvalho de Melo , linux-kernel , Jiri Olsa References: <20200807164937.44921-1-dsahern@kernel.org> From: David Ahern Message-ID: <47111ff4-c61a-3a12-adb6-748b98fd0be0@gmail.com> Date: Tue, 11 Aug 2020 21:12:10 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/11/20 12:42 AM, Namhyung Kim wrote: >> @@ -2575,7 +2575,8 @@ static int timehist_sched_change_event(struct perf_tool *tool, >> } >> >> if (!sched->idle_hist || thread->tid == 0) { >> - timehist_update_runtime_stats(tr, t, tprev); >> + if (!cpu_list || test_bit(sample->cpu, cpu_bitmap)) >> + timehist_update_runtime_stats(tr, t, tprev); >> >> if (sched->idle_hist) { >> struct idle_thread_runtime *itr = (void *)tr; >> @@ -2848,6 +2849,9 @@ static void timehist_print_summary(struct perf_sched *sched, >> >> printf("\nIdle stats:\n"); >> for (i = 0; i < idle_max_cpu; ++i) { >> + if (!test_bit(i, cpu_bitmap)) > > Shouldn't it check cpu_list as well? > oh, right. will fix.