Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1219595imm; Tue, 5 Jun 2018 10:53:04 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ4wiyV0gEjMlH/DGNOnV7HqE/DOmSEqk3bTXVgyjeiAwRRjd03sgesof6cT5anr0ZZMOCu X-Received: by 2002:a17:902:6f16:: with SMTP id w22-v6mr26943303plk.216.1528221184688; Tue, 05 Jun 2018 10:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528221184; cv=none; d=google.com; s=arc-20160816; b=cK3oJvoPUx5RJIZjxTcoWsYSdV9SR7/dJz0DClhSWIXB5FLVKGKtY0GkU7BwyRjZD1 StBmsd6/l6l+FzunmyF4LLV/bKS9/yQs7SmebpFk1PjnT52hJT6pTcKxGQU4vypN8Rgn e4neJGc9U0WOBj0YGsvF7jMAlL6TFSbUuEINltyF/GYs1QUiM7lUiykbkYmllT1TmwM3 4ZWGhxklczsPcYqlrSsVpSlva2d8UlQZ7ynLt0s0XYBaHIc0pBhjuu1IVaIWarn0EcZA f6ZktDJPYI40zE/lBwtcLhFaJp/JF/biNCAHwRtHpGB9fhh3ij/Xy4wRVZucm815uyXA Y0vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=PyVKdtE71eTOlaBa9+Qlpg1XC3BlthOjHBAkygs0ezI=; b=It6j6whG90PW9shWnXI8Uwu+WoLcj1JdYDVPOki3QQBtHqwOhuN4q1zAJNLgy0pAVU xpUw5Evle32QCD4FU+yJzgxQIPFlxSlQcp8McfCYzDFGVpt4uPiYDe3Hk0jD/BE9fWFe p4yo4HJtzxjCCV+vQGsTyI3sBCsOMPwdjXi1LrnFPlypxxO0uEFaojyobxKULqzYxz9c CkC131vl+lYswWXslnKuB4I4uQ4ZOQ4tHB5IDFBx9XeoN4WZOwxjxJ1Z9MD62Vw9W9/X nin6xqJxyBKuZt1/rnsG7gf6pBst9QRgGQMC8NWJ6rtxwG13CVRl+rDxlMH295aXamW9 4o1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kQMB/CVj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id r6-v6si5600214pfl.260.2018.06.05.10.52.49; Tue, 05 Jun 2018 10:53:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kQMB/CVj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1752793AbeFERwP (ORCPT + 99 others); Tue, 5 Jun 2018 13:52:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:46368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752769AbeFERwL (ORCPT ); Tue, 5 Jun 2018 13:52:11 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (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 372852075B; Tue, 5 Jun 2018 17:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528221130; bh=XjBeYGy7OLQp8yI1KoD9EU277i/rQdy3Huu6rMkAkZU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kQMB/CVjXYYmlgXxrvQyzS+/dzq2ZxYbw1qFb8PbOVPtGPAiKGGES8qaDYW01Y+ze wvv9s/o+FOY2lRfcqkGh9AwNcXc3QDb+WA6yUAIewax4L5pXOle4jbYAN5fZPYBZoj JLPm8aoshALh8D9MdjVZmBYDZ/IH4cX0/TsfAP4g= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , David Ahern , Jiri Olsa , Namhyung Kim , Wang Nan Subject: [PATCH 30/46] perf sched: Use sched->show_callchain where appropriate Date: Tue, 5 Jun 2018 14:50:14 -0300 Message-Id: <20180605175030.32549-31-acme@kernel.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180605175030.32549-1-acme@kernel.org> References: <20180605175030.32549-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnaldo Carvalho de Melo Instead of using symbol_conf.use_callchain, reducing its usage a bit more. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-edgwb1b2mpbrdeg0w64wp7ms@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-sched.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 97f9e755e8e6..cbf39dab19c1 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -2143,7 +2143,7 @@ static void save_task_callchain(struct perf_sched *sched, return; } - if (!symbol_conf.use_callchain || sample->callchain == NULL) + if (!sched->show_callchain || sample->callchain == NULL) return; if (thread__resolve_callchain(thread, cursor, evsel, sample, @@ -2271,10 +2271,11 @@ static struct thread *get_idle_thread(int cpu) return idle_threads[cpu]; } -static void save_idle_callchain(struct idle_thread_runtime *itr, +static void save_idle_callchain(struct perf_sched *sched, + struct idle_thread_runtime *itr, struct perf_sample *sample) { - if (!symbol_conf.use_callchain || sample->callchain == NULL) + if (!sched->show_callchain || sample->callchain == NULL) return; callchain_cursor__copy(&itr->cursor, &callchain_cursor); @@ -2320,7 +2321,7 @@ static struct thread *timehist_get_thread(struct perf_sched *sched, /* copy task callchain when entering to idle */ if (perf_evsel__intval(evsel, sample, "next_pid") == 0) - save_idle_callchain(itr, sample); + save_idle_callchain(sched, itr, sample); } } @@ -2849,7 +2850,7 @@ static void timehist_print_summary(struct perf_sched *sched, printf(" CPU %2d idle entire time window\n", i); } - if (sched->idle_hist && symbol_conf.use_callchain) { + if (sched->idle_hist && sched->show_callchain) { callchain_param.mode = CHAIN_FOLDED; callchain_param.value = CCVAL_PERIOD; -- 2.14.3