Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1231793imm; Tue, 5 Jun 2018 11:04:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL2dz45bfu/7InJaBoDmNcmGdlP3K44vJX3iSfBVoo778MbMbfR608hVHLAcujIV7Wkuc3j X-Received: by 2002:a17:902:4483:: with SMTP id l3-v6mr27686893pld.282.1528221854837; Tue, 05 Jun 2018 11:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528221854; cv=none; d=google.com; s=arc-20160816; b=Fc/xX61NY7KH+g58u/VBxT0iisIVS0rOG0omRMbMEhHL0GAECoyDXqzG7L8fUJ38YQ jbJW7SWxrBRXnSw8BZUV+Pwbp3PgeyAYuvdcmjQFjJKntttBmaHeIYq7MjJ7muKQyK7/ 9goW/207Dp6+EKMCkO2T4puqmXFqN/Oh876oy4d8xLf5h72GXOBH8Vb+iwT/FLW5+ZF1 GtQifREQwWGTbGBSJGINFSz1NKy3YHxN91dk5rktH8L50twg7MMIatQ5Re8w5Qkocc3p oJm/+NCxvG9xKfdDzCTpX2I3SPlTGS9bXk80lH67EhD0xlRHxb0Vf+zYUCLEoDDbeFsS YC+Q== 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=ABLCMFkRZ4u3mOek4jPtecwlWwFjGmnAs0hymrwrkF4=; b=lw8B4nhBm9gF0DBt9akz8tMdMBuQ/RyGi1PrbpiikbH2/00XEZBX1OVfzWdD4KVqTr 3f3bZMlyGKFFx59tlD/ag+O6sgDNYueNI9HoNs605KQ/+DVstyOpegTVUdgEmNDeA7yl Ewj0SkDDtvzCiQLb8bgFbEWfAfHxiyY7N4Sz5E9Rzrkoa4SZBFV7Su2AOI/ACCqmKu/E Jz7EFeFS6iVID7iqQWj1o7P3DwMF99X4yoYKgT2cNDZxFfj8j7NTtzhFpisjcO1NkBw9 X1ioGKxXtV/wTXQxil55WiBNZMckBenf8dOpRYl7kY/pfOGY5Y6GsYkt8925/i71UqgM 50uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SP2HgSXg; 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 q71-v6si14340613pfd.153.2018.06.05.11.04.00; Tue, 05 Jun 2018 11:04:14 -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=SP2HgSXg; 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 S1752411AbeFERva (ORCPT + 99 others); Tue, 5 Jun 2018 13:51:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:45842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752369AbeFERv0 (ORCPT ); Tue, 5 Jun 2018 13:51:26 -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 BCC0C2075B; Tue, 5 Jun 2018 17:51:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528221086; bh=6HMh4wDNsSrfbmNqGk7P30Do/Z9Kw+M1YRVnfkd5O2c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SP2HgSXgpJomh5DyuRL/NHxA1ClZDVHSZNHA8q3t3L/0SUQtFZyD6edZLRZyTPjq0 A5qt0ahsQqzl3Z8FFwa5RdVVrapiWLySPB9J4/2EpPVs8a4O+oB1BO3UfyFUDXnF7g PSznMzAec9fIWsoA6zwwPuNrO+v8tmwwbanxqWd4= 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 15/46] perf tools: Ditch the symbol_conf.nr_events global Date: Tue, 5 Jun 2018 14:49:59 -0300 Message-Id: <20180605175030.32549-16-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 Since over time the places where we need to pass this got reduced because we can obtain it from evsel->evlist->nr_entries, no need to have this global anymore. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-ovhikrfj8pzdv93yq3gt6sei@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-kvm.c | 2 -- tools/perf/builtin-top.c | 2 -- tools/perf/util/header.c | 4 ---- tools/perf/util/symbol.h | 1 - 4 files changed, 9 deletions(-) diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 72e2ca096bf5..2b1ef704169f 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c @@ -1438,8 +1438,6 @@ static int kvm_events_live(struct perf_kvm_stat *kvm, goto out; } - symbol_conf.nr_events = kvm->evlist->nr_entries; - if (perf_evlist__create_maps(kvm->evlist, &kvm->opts.target) < 0) usage_with_options(live_usage, live_options); diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 04fe04885e99..4284840022a3 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1462,8 +1462,6 @@ int cmd_top(int argc, const char **argv) goto out_delete_evlist; } - symbol_conf.nr_events = top.evlist->nr_entries; - if (top.delay_secs < 1) top.delay_secs = 1; diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index a8bff2178fbc..2625cc38a0d6 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -3312,8 +3312,6 @@ int perf_session__read_header(struct perf_session *session) lseek(fd, tmp, SEEK_SET); } - symbol_conf.nr_events = nr_attrs; - perf_header__process_sections(header, fd, &session->tevent, perf_file_section__process); @@ -3739,8 +3737,6 @@ int perf_event__process_attr(struct perf_tool *tool __maybe_unused, perf_evlist__id_add(evlist, evsel, 0, i, event->attr.id[i]); } - symbol_conf.nr_events = evlist->nr_entries; - return 0; } diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 1a16438eb3ce..1be9a6bad967 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h @@ -90,7 +90,6 @@ struct intlist; struct symbol_conf { unsigned short priv_size; - unsigned short nr_events; bool try_vmlinux_path, init_annotation, force, -- 2.14.3