From patchwork Tue Nov 8 07:35:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13035971 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 891C9C433FE for ; Tue, 8 Nov 2022 07:37:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233583AbiKHHht (ORCPT ); Tue, 8 Nov 2022 02:37:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233578AbiKHHhS (ORCPT ); Tue, 8 Nov 2022 02:37:18 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49156317C7 for ; Mon, 7 Nov 2022 23:37:17 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-349423f04dbso130643027b3.13 for ; Mon, 07 Nov 2022 23:37:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=FRHZ0FW2HIw6QS+Bkui5kSfb7e3a9NpS1DLZODqxyrQ=; b=UK9wldQbKYz7jAyqp+y9ajL5KFs/W8dhw8WTiCKwIN0gvbMvW/zwJwry3YzoY7dfK9 ZV2AaTazbIV9GyTPQ22svSW1O4C9JtIo/yTNaDlH/crRhHjsEOEpF9Sr+MWanyb7a6qM YGzUgX7/VVf2zRl1nTBL9ON8REIjnqlEE+CQ5NuIKRyT619PTBW9aNyyqdnnc4s7a0Mc 1HNjuH/401liKQtNxjzgCHTMlnOeOycKWitfRQPqEEpunjXdP2pSPHltTsYGTRW/xGFY vGmTEdA3+JmX1xATUiMFTK8IpHCWZ28rXjR7/WmW4mBs4penOn+mJ/VFlopVl+SVvE+y IHxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FRHZ0FW2HIw6QS+Bkui5kSfb7e3a9NpS1DLZODqxyrQ=; b=z1/cX2KuRQmnG/njbauNeQPsjiZqk8WCyDXGJ2nJhpTpEBskE5fl1gyOfLgn13GY/p 6nKz+jmvzMvGtw8W7dfcktI0Fi15B7TLor0qtQInRREPdgBT7v/zOL7CzJUpKJDB1hG2 INGJgFg+KgzQByNb1DnVVqBQJUNufpzbawh+idN4un9nfEJXleDuBLIBVU/V2UdR6PQr IxrGitSNnb/zavd61ponMr31OuTsRSzr2MyUz2ARCzEbxiR+tSlGsIjAg9ryL6NYwvYq lZxdRxvahl6HnlrpXdCv8FUx1K8WlVG9SZ0XTivMhuF++ofjVTepO53hqXKeQ4cYwlX8 Je/A== X-Gm-Message-State: ACrzQf3qAISCAvcHm55TpJVUcA6Rw3P0tyW9efCdLiZ64ZgRmjytxFHI KGwxWMoAvDDI8NTK3zgaSBOwrto/M1+f X-Google-Smtp-Source: AMsMyM7BidvVdfJrnNQEj701FAtK2No5xh3laeI7L2ERB+pyHS3hJJrTwfyEztoTmfd9YvoaHLj/EGtGur2Z X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:a697:9013:186f:ed07]) (user=irogers job=sendgmr) by 2002:a25:bd1:0:b0:6cb:ada3:1ca with SMTP id 200-20020a250bd1000000b006cbada301camr51188690ybl.24.1667893036863; Mon, 07 Nov 2022 23:37:16 -0800 (PST) Date: Mon, 7 Nov 2022 23:35:17 -0800 In-Reply-To: <20221108073518.1154450-1-irogers@google.com> Message-Id: <20221108073518.1154450-14-irogers@google.com> Mime-Version: 1.0 References: <20221108073518.1154450-1-irogers@google.com> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog Subject: [PATCH v1 13/14] perf cpumap: Tidy libperf includes From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Masahiro Yamada , Nicolas Schier , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, bpf@vger.kernel.org, Nick Desaulniers , Andrii Nakryiko Cc: Stephane Eranian , Ian Rogers Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Use public API when possible, don't include internal API in header files in evsel.h. Fix any related breakages. Signed-off-by: Ian Rogers --- tools/perf/tests/cpumap.c | 2 +- tools/perf/util/auxtrace.h | 2 +- tools/perf/util/cpumap.c | 1 + tools/perf/util/cpumap.h | 2 +- tools/perf/util/evsel.h | 2 -- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/perf/tests/cpumap.c b/tools/perf/tests/cpumap.c index 7c873c6ae3eb..3150fc1fed6f 100644 --- a/tools/perf/tests/cpumap.c +++ b/tools/perf/tests/cpumap.c @@ -6,7 +6,7 @@ #include "util/synthetic-events.h" #include #include -#include +#include #include "debug.h" struct machine; diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index 6a0f9b98f059..2cf63d377831 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index 6e3fcf523de9..5e564974fba4 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -12,6 +12,7 @@ #include #include +#include static struct perf_cpu max_cpu_num; static struct perf_cpu max_present_cpu_num; diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h index da28b3146ef9..c2f5824a3a22 100644 --- a/tools/perf/util/cpumap.h +++ b/tools/perf/util/cpumap.h @@ -4,8 +4,8 @@ #include #include -#include #include +#include /** Identify where counts are aggregated, -1 implies not to aggregate. */ struct aggr_cpu_id { diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index 989865e16aad..f5d9f6a351cd 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -10,8 +10,6 @@ #include #include #include "symbol_conf.h" -#include -#include struct bpf_object; struct cgroup;