perf bench bpf: Add missing .gitignore file
Arnaldo Carvalho de Melo
maintainerPATCH 1/1 perf bench bpf: Add missing .gitignore file
Hi Linus,
I'll have this in the next pull req if you prefer not to merge
now,
- Arnaldo
---
From: Arnaldo Carvalho de Melo <[email protected]>
In 713eeb2279402758 ("perf build: Move BPF skeleton generation out of Makefile.perf") the bpf_skel used with 'perf bench uprobe' was moved from tools/perf/util/bpf_skel/ to tools/perf/bench/bpf_skel.
Copy tools/perf/util/bpf_skel/.gitignore to that new directory so that files generated during build get ignored by git.
--- tools/perf/bench/bpf_skel/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tools/perf/bench/bpf_skel/.gitignore
tools/perf/bench/bpf_skel/.gitignore new file +4 -0
@@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only +.tmp +*.skel.h +vmlinux.h
Signature · 1 line
2.54.0
Quoted 36 lines · Arnaldo Carvalho de Melo
Hi Linus,
I'll have this in the next pull req if you prefer not to merge
now,- Arnaldo
---
From: Arnaldo Carvalho de Melo <[email protected]>In
713eeb2279402758("perf build: Move BPF skeleton generation out of Makefile.perf") thebpf_skelused with 'perf bench uprobe' was moved fromtools/perf/util/bpf_skel/totools/perf/bench/bpf_skel.Copy
tools/perf/util/bpf_skel/.gitignoreto that new directory so that files generated during build get ignored by git.Reported-by Linus Torvalds <[email protected]>Cc Adrian Hunter <[email protected]>Cc Ian Rogers <[email protected]>Cc James Clark <[email protected]>Cc Jiri Olsa <[email protected]>Cc Namhyung Kim <[email protected]>Fixes 713eeb2279402758 ("perf build: Move BPF skeleton generation out of Makefile.perf")Signed-off-by Arnaldo Carvalho de Melo <[email protected]>--- tools/perf/bench/bpf_skel/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tools/perf/bench/bpf_skel/.gitignoretools/perf/bench/bpf_skel/.gitignore new file +0
-0
tools/perf/bench/bpf_skel/.gitignore line 4
Quoted 4 lines
tools/perf/bench/bpf_skel/.gitignore new file +4
-0@@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only +.tmp +*.skel.h +vmlinux.h
I think it's enough to add '*.skel.h' only as other files are still under util/bpf_skel. But having others would not be harmful.
Thanks,
Namhyung
Arnaldo Carvalho de Melo
maintainerQuoted 11 lines · Namhyung Kim
tools/perf/bench/bpf_skel/.gitignore line 4
Quoted 6 lines · Arnaldo Carvalho de Melo
+++ b/tools/perf/bench/bpf_skel/.gitignore
tools/perf/bench/bpf_skel/.gitignore new file +4
-0@@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only +.tmp +*.skel.h +vmlinux.hI think it's enough to add '*.skel.h' only as other files are still under util/bpf_skel. But having others would not be harmful.
Quoted 1 line
Acked-by Namhyung Kim <[email protected]>
⬢ [acme@toolbx perf-tools]$ ls -la tools/perf/bench/bpf_skel/.tmp total 8
drwxr-xr-x. 1 acme acme 36 Jun 23 21:01 .
drwxr-xr-x. 1 acme acme 102 Jun 23 21:01 .. -rw-r--r--. 1 acme acme 7840 Jun 23 21:01 bench_uprobe.bpf.o ⬢ [acme@toolbx perf-tools]$
.tmp is created as well.
- Arnaldo
Quoted 2 lines · Arnaldo Carvalho de Melo
.tmp is created as well.
Note that the top-level .gitignore makes sure that we ignore any dot-files by default (along with a lot of the usual patterns, of course - not just object files, but various other binary file endings).
( Yes, gitignore files do allow overrides to "un-ignore" files too, but almost nobody ever uses that, there's seldom any reason for some top-level file to say "ignore all generated files of this pattern" and then a subdirectory gitignore says "but not this pattern". Some crazy directories do say "ignore everything" and then they explicitly unignore some patterns, but honestly, that's a mark of a diseased mind )
Linus
Arnaldo Carvalho de Melo
maintainerQuoted 9 lines · Linus Torvalds
Quoted 2 lines · Arnaldo Carvalho de Melo
.tmp is created as well.
Note that the top-level .gitignore makes sure that we ignore any dot-files by default (along with a lot of the usual patterns, of course - not just object files, but various other binary file endings).
Quoted 7 lines
( Yes, gitignore files do allow overrides to "un-ignore" files too, but almost nobody ever uses that, there's seldom any reason for some top-level file to say "ignore all generated files of this pattern" and then a subdirectory gitignore says "but not this pattern". Some crazy directories do say "ignore everything" and then they explicitly unignore some patterns, but honestly, that's a mark of a diseased mind )
Yeah, but having .tmp there its kinda like not depending on having the prototype for a function indirectly obtained via some include chain, by luck, having .tmp there documents that that thing is (or a strong maybe, in the case of vmlinux.h) generated there and should be ignored.
Anyway, now it is ignored, doubly so in the case of .tmp.
- Arnaldo