Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1234467imm; Tue, 5 Jun 2018 11:06:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI0uF6op3aHLJmazdD/DVNelundgFDClVJof6ELlYAzYEuDX0puXU4RV6+sw24gZTuO9Eqj X-Received: by 2002:a17:902:5597:: with SMTP id g23-v6mr26982659pli.99.1528221994606; Tue, 05 Jun 2018 11:06:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528221994; cv=none; d=google.com; s=arc-20160816; b=IPPk/ccOvb6Ts+lriKECd7oYUiLpxj1rQBkbHX0KYEFncEnmkEDECIOgvns06MgR/Y b5OuFib/T8Ao+sZVhKYJQhTBv9KzHXCMYild+CmP92UNCqla4kckPAIx50dJVs3A6GJK t+xBOu/daR4YYkJ0GK0IezwBzPi89eG6iVLwo/hooCEDTrMxdq3T0LRvdCIMieqZzfJ0 SGJWYYnP7cqsDDAB0wEGyqgkVrezILaYD5kzKv42yyLath9+Mt90llSjXDeYf/wB9dr1 pz+zzXCHG8wxpj1mx61yE5d9FUBaz4x/Vo9tspkNTY2Pp8RPFa2vwb0kYiyYxZRf5hBM OqWw== 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=LIu/hifM1uqtPeLqAgFYhWgbGqODB328R22mk9FhSw0=; b=C/YkNEpLLV7/vhqYj5G3xtrFu3xbvS32GswRwJOzjzOu5aeqpZAnkDBVXIj5h+T8TF cVT7zXEDcAX8GFmF85MG2IvUeQ/iwIDB8z+6y/hb3TctlRzbUhla7S6J8AWGKBv9tXoO iqsRdv6sqJLjCHZxh2GDLql+q0/O4Nvk293Lj7bWPJ9mIBGVw9bwmXvo5Q9WW0nYIxTr cAy1wHBDKty6hKQK26AGm2tD6wDkzuKS0pCJqys+B+XipI91ZtpJtda7ISWcHEt1mZJr Y0jHWEgJsHsJLs2/EuJfuuR6DVOeynH9kwGku774nR4WFHi3pbc7IzEqYVYuoZI8aPXt W3bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0VrnYVuX; 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 b83-v6si23853417pfk.342.2018.06.05.11.06.20; Tue, 05 Jun 2018 11:06:34 -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=0VrnYVuX; 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 S1752481AbeFESFx (ORCPT + 99 others); Tue, 5 Jun 2018 14:05:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:45538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752056AbeFERvA (ORCPT ); Tue, 5 Jun 2018 13:51:00 -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 67AB12083C; Tue, 5 Jun 2018 17:50:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528221059; bh=AvFZG5XmTuWp6lV0RirGsF2IkhJCNSBw4kLr0bKiAmc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0VrnYVuX+4OGGD14hcUVzjFcp9Xetaf768XOtCoJtdtlMaDZAqfqRBbJZ4AUVDzSq bHphnDXF4IhHqCYfGPvV6ISEcsq97pxD1U16+heXPZmcDjF3FknRDRLcUcmbO3mTUF KIK+PTGZVp6OkiXDl4VJVK36VJEX7GpB5hKdsHCc= 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 06/46] perf annotate: __symbol__acount_cycles doesn't need notes Date: Tue, 5 Jun 2018 14:49:50 -0300 Message-Id: <20180605175030.32549-7-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 It only operates on the notes->src->cyc_hist, just pass that to it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-zd1cu4zwmu21k0cxlr83y6vr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/annotate.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 0f5ed6091e00..a7221f9fa504 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -741,14 +741,11 @@ void symbol__annotate_zero_histograms(struct symbol *sym) pthread_mutex_unlock(¬es->lock); } -static int __symbol__account_cycles(struct annotation *notes, +static int __symbol__account_cycles(struct cyc_hist *ch, u64 start, unsigned offset, unsigned cycles, unsigned have_start) { - struct cyc_hist *ch; - - ch = notes->src->cycles_hist; /* * For now we can only account one basic block per * final jump. But multiple could be overlapping. @@ -870,7 +867,7 @@ static int symbol__account_cycles(u64 addr, u64 start, start = 0; } offset = addr - sym->start; - return __symbol__account_cycles(notes, + return __symbol__account_cycles(notes->src->cycles_hist, start ? start - sym->start : 0, offset, cycles, !!start); -- 2.14.3