perf parse-events: Remove unused header files

Started by Ian Rogers on Sep 11, 2023 · 11 messages from 3 authors · Last reply Sep 12, 2023

Subsystems (2)

Maintainers (5)

Show 1 more
STALE1147d LANDED

Status: Landed in mainline as dc2cfef9a9af on 2023-09-12.

open the first message on its own page

  1. [PATCH v1 1/5] perf parse-events: Remove unused header files
    Related patches
  2. [PATCH v1 5/5] perf bpf-filter: Add YYDEBUG
    Related patches
  3. [PATCH v1 2/5] perf parse-events: Make YYDEBUG dependent on doing a debug build
    Related patches
  4. [PATCH v1 4/5] perf pmu: Add YYDEBUG
    Related patches
  5. [PATCH v1 3/5] perf expr: Make YYDEBUG dependent on doing a debug build
    Related patches
Message details and related content
The fnmatch header is now used in the PMU matching logic in pmu.c.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/parse-events.y | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 21bfe7e0d944..ef03728b7ea3 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -9,11 +9,8 @@
 #define YYDEBUG 1
 
 #include <errno.h>
-#include <fnmatch.h>
-#include <stdio.h>
 #include <linux/compiler.h>
 #include <linux/types.h>
-#include <linux/zalloc.h>
 #include "pmu.h"
 #include "pmus.h"
 #include "evsel.h"
-- 
2.42.0.283.g2d96d420d3-goog

[PATCH v1 5/5] perf bpf-filter: Add YYDEBUG

Message details and related content
YYDEBUG enables line numbers and other error helpers in the generated
bpf-filter-bison.c. Conditionally enabled only for debug builds.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/bpf-filter.y | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/tools/perf/util/bpf-filter.y b/tools/perf/util/bpf-filter.y
index 5dfa948fc986..0e4d6de3c2ad 100644
--- a/tools/perf/util/bpf-filter.y
+++ b/tools/perf/util/bpf-filter.y
@@ -3,6 +3,10 @@
 
 %{
 
+#ifndef NDEBUG
+#define YYDEBUG 1
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <linux/compiler.h>
-- 
2.42.0.283.g2d96d420d3-goog

[PATCH v1 2/5] perf parse-events: Make YYDEBUG dependent on doing a debug build

Message details and related content
YYDEBUG enables line numbers and other error helpers in the generated
parse-events-bison.c. These shouldn't be generated when debugging
isn't enabled.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/parse-events.y | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index ef03728b7ea3..786393106ae6 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -6,7 +6,9 @@
 
 %{
 
+#ifndef NDEBUG
 #define YYDEBUG 1
+#endif
 
 #include <errno.h>
 #include <linux/compiler.h>
-- 
2.42.0.283.g2d96d420d3-goog

[PATCH v1 4/5] perf pmu: Add YYDEBUG

Message details and related content
YYDEBUG enables line numbers and other error helpers in the generated
pmu-bison.c. Conditionally enabled only for debug builds.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/pmu.y | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/tools/perf/util/pmu.y b/tools/perf/util/pmu.y
index 600c8c158c8e..198907a8a48a 100644
--- a/tools/perf/util/pmu.y
+++ b/tools/perf/util/pmu.y
@@ -5,6 +5,10 @@
 
 %{
 
+#ifndef NDEBUG
+#define YYDEBUG 1
+#endif
+
 #include <linux/compiler.h>
 #include <linux/list.h>
 #include <linux/bitmap.h>
-- 
2.42.0.283.g2d96d420d3-goog

[PATCH v1 3/5] perf expr: Make YYDEBUG dependent on doing a debug build

Message details and related content
YYDEBUG enables line numbers and other error helpers in the generated
expr-bison.c. These shouldn't be generated when debugging
isn't enabled.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/expr.y | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y
index 6c93b358cc2d..e364790babb5 100644
--- a/tools/perf/util/expr.y
+++ b/tools/perf/util/expr.y
@@ -1,6 +1,8 @@
 /* Simple expression parser */
 %{
+#ifndef NDEBUG
 #define YYDEBUG 1
+#endif
 #include <assert.h>
 #include <math.h>
 #include <stdlib.h>
-- 
2.42.0.283.g2d96d420d3-goog
Message details and related content
On Mon, Sep 11, 2023 at 10:06 AM Ian Rogers [off-list ref] wrote:
The fnmatch header is now used in the PMU matching logic in pmu.c.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung
quoted hunk
---
 tools/perf/util/parse-events.y | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 21bfe7e0d944..ef03728b7ea3 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -9,11 +9,8 @@
 #define YYDEBUG 1

 #include <errno.h>
-#include <fnmatch.h>
-#include <stdio.h>
 #include <linux/compiler.h>
 #include <linux/types.h>
-#include <linux/zalloc.h>
 #include "pmu.h"
 #include "pmus.h"
 #include "evsel.h"
--
2.42.0.283.g2d96d420d3-goog

Re: [PATCH v1 2/5] perf parse-events: Make YYDEBUG dependent on doing a debug build

Message details and related content
On Mon, Sep 11, 2023 at 10:06 AM Ian Rogers [off-list ref] wrote:
YYDEBUG enables line numbers and other error helpers in the generated
parse-events-bison.c. These shouldn't be generated when debugging
isn't enabled.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

quoted hunk
---
 tools/perf/util/parse-events.y | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index ef03728b7ea3..786393106ae6 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -6,7 +6,9 @@

 %{

+#ifndef NDEBUG
 #define YYDEBUG 1
+#endif

 #include <errno.h>
 #include <linux/compiler.h>
--
2.42.0.283.g2d96d420d3-goog

Re: [PATCH v1 3/5] perf expr: Make YYDEBUG dependent on doing a debug build

Message details and related content
On Mon, Sep 11, 2023 at 10:06 AM Ian Rogers [off-list ref] wrote:
YYDEBUG enables line numbers and other error helpers in the generated
expr-bison.c. These shouldn't be generated when debugging
isn't enabled.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

quoted hunk
---
 tools/perf/util/expr.y | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y
index 6c93b358cc2d..e364790babb5 100644
--- a/tools/perf/util/expr.y
+++ b/tools/perf/util/expr.y
@@ -1,6 +1,8 @@
 /* Simple expression parser */
 %{
+#ifndef NDEBUG
 #define YYDEBUG 1
+#endif
 #include <assert.h>
 #include <math.h>
 #include <stdlib.h>
--
2.42.0.283.g2d96d420d3-goog

Re: [PATCH v1 4/5] perf pmu: Add YYDEBUG

Message details and related content
On Mon, Sep 11, 2023 at 10:06 AM Ian Rogers [off-list ref] wrote:
YYDEBUG enables line numbers and other error helpers in the generated
pmu-bison.c. Conditionally enabled only for debug builds.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

quoted hunk
---
 tools/perf/util/pmu.y | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/tools/perf/util/pmu.y b/tools/perf/util/pmu.y
index 600c8c158c8e..198907a8a48a 100644
--- a/tools/perf/util/pmu.y
+++ b/tools/perf/util/pmu.y
@@ -5,6 +5,10 @@

 %{

+#ifndef NDEBUG
+#define YYDEBUG 1
+#endif
+
 #include <linux/compiler.h>
 #include <linux/list.h>
 #include <linux/bitmap.h>
--
2.42.0.283.g2d96d420d3-goog

Re: [PATCH v1 5/5] perf bpf-filter: Add YYDEBUG

Message details and related content
On Mon, Sep 11, 2023 at 10:06 AM Ian Rogers [off-list ref] wrote:
YYDEBUG enables line numbers and other error helpers in the generated
bpf-filter-bison.c. Conditionally enabled only for debug builds.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

quoted hunk
---
 tools/perf/util/bpf-filter.y | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/tools/perf/util/bpf-filter.y b/tools/perf/util/bpf-filter.y
index 5dfa948fc986..0e4d6de3c2ad 100644
--- a/tools/perf/util/bpf-filter.y
+++ b/tools/perf/util/bpf-filter.y
@@ -3,6 +3,10 @@

 %{

+#ifndef NDEBUG
+#define YYDEBUG 1
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <linux/compiler.h>
--
2.42.0.283.g2d96d420d3-goog
Message details and related content
Em Mon, Sep 11, 2023 at 10:58:18PM -0700, Namhyung Kim escreveu:
On Mon, Sep 11, 2023 at 10:06 AM Ian Rogers [off-list ref] wrote:
quoted
The fnmatch header is now used in the PMU matching logic in pmu.c.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>


Thanks, applied the series.

- Arnaldo

 
Thanks,
Namhyung
quoted
---
 tools/perf/util/parse-events.y | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 21bfe7e0d944..ef03728b7ea3 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -9,11 +9,8 @@
 #define YYDEBUG 1

 #include <errno.h>
-#include <fnmatch.h>
-#include <stdio.h>
 #include <linux/compiler.h>
 #include <linux/types.h>
-#include <linux/zalloc.h>
 #include "pmu.h"
 #include "pmus.h"
 #include "evsel.h"
--
2.42.0.283.g2d96d420d3-goog
-- 

- Arnaldo
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help