perf tools: Add a place to put kernel config fragments for test runs
RFC PATCH 1/1 perf tools: Add a place to put kernel config fragments for test runs
We are currently keeping something like this in our CI because defconfig doesn't give full coverage. It's not complete yet, but is a starting point as a place to add to when a specific test needs something extra to run.
The RFC is for discussion on folder placement and file naming etc.
--- tools/perf/tests/config-fragments/README | 7 +++++++ tools/perf/tests/config-fragments/aarch64 | 1 + tools/perf/tests/config-fragments/config | 11 +++++++++++ 3 files changed, 19 insertions(+) create mode 100644 tools/perf/tests/config-fragments/README create mode 100644 tools/perf/tests/config-fragments/aarch64 create mode 100644 tools/perf/tests/config-fragments/config
tools/perf/tests/config-fragments/README new file +7 -0
@@ -0,0 +1,7 @@ +This folder is for kernel config fragments that can be merged with +defconfig to give full test coverage of a perf test run. This is only +an optimistic set as some features require hardware support in order to +pass and not skip. + +'config' is shared across all platforms, and for arch specific files, +the file name should match that returned by 'uname -m'.
tools/perf/tests/config-fragments/aarch64 new file +1 -0
@@ -0,0 +1 @@ +CONFIG_CORESIGHT_SOURCE_ETM4X=y
tools/perf/tests/config-fragments/config new file +11 -0
@@ -0,0 +1,11 @@ +CONFIG_TRACEPOINTS=y +CONFIG_STACKTRACE=y +CONFIG_NOP_TRACER=y +CONFIG_RING_BUFFER=y +CONFIG_EVENT_TRACING=y +CONFIG_CONTEXT_SWITCH_TRACER=y +CONFIG_TRACING=y +CONFIG_GENERIC_TRACER=y +CONFIG_FTRACE=y +CONFIG_FTRACE_SYSCALLS=y +CONFIG_BRANCH_PROFILE_NONE=y
Signature · 1 line
2.34.1
Arnaldo Carvalho de Melo
maintainerEm Wed, Jun 14, 2023 at 03:02:19PM +0100, James Clark escreveu:
Quoted 6 lines
We are currently keeping something like this in our CI because defconfig doesn't give full coverage. It's not complete yet, but is a starting point as a place to add to when a specific test needs something extra to run.
The RFC is for discussion on folder placement and file naming etc.
Would be interesting to add the Kconfig maintainer to see if they have an opinion, Masahiro?
- Arnaldo
Quoted 50 lines
Signed-off-by James Clark <[email protected]>--- tools/perf/tests/config-fragments/README | 7 +++++++ tools/perf/tests/config-fragments/aarch64 | 1 + tools/perf/tests/config-fragments/config | 11 +++++++++++ 3 files changed, 19 insertions(+) create mode 100644 tools/perf/tests/config-fragments/README create mode 100644 tools/perf/tests/config-fragments/aarch64 create mode 100644 tools/perf/tests/config-fragments/configtools/perf/tests/config-fragments/README new file +7
-0@@ -0,0 +1,7 @@ +This folder is for kernel config fragments that can be merged with +defconfig to give full test coverage of a perf test run. This is only +an optimistic set as some features require hardware support in order to +pass and not skip. + +'config' is shared across all platforms, and for arch specific files, +the file name should match that returned by 'uname -m'.tools/perf/tests/config-fragments/aarch64 new file +1
-0@@ -0,0 +1 @@ +CONFIG_CORESIGHT_SOURCE_ETM4X=ytools/perf/tests/config-fragments/config new file +11
-0@@ -0,0 +1,11 @@ +CONFIG_TRACEPOINTS=y +CONFIG_STACKTRACE=y +CONFIG_NOP_TRACER=y +CONFIG_RING_BUFFER=y +CONFIG_EVENT_TRACING=y +CONFIG_CONTEXT_SWITCH_TRACER=y +CONFIG_TRACING=y +CONFIG_GENERIC_TRACER=y +CONFIG_FTRACE=y +CONFIG_FTRACE_SYSCALLS=y +CONFIG_BRANCH_PROFILE_NONE=ySignature · 1 line
2.34.1
Signature · 1 line
- Arnaldo
Quoted 6 lines · Arnaldo Carvalho de Melo
Em Wed, Jun 14, 2023 at 03:02:19PM +0100, James Clark escreveu:
Quoted 5 lines
We are currently keeping something like this in our CI because defconfig doesn't give full coverage. It's not complete yet, but is a starting point as a place to add to when a specific test needs something extra to run.
Quoted 7 lines
Quoted 1 line
The RFC is for discussion on folder placement and file naming etc.
Would be interesting to add the
Kconfigmaintainer to see if they have an opinion, Masahiro?- Arnaldo
One concern I have is that uname -m gives a different result to the ARCH= option for a kernel build (ARCH=arm64). Probably the build time version is more useful to us so maybe that should be the file name. Not sure what the x86 version is or if anyone is actually doing cross x86 builds...
Quoted 51 lines
Quoted 50 lines
Signed-off-by James Clark <[email protected]>--- tools/perf/tests/config-fragments/README | 7 +++++++ tools/perf/tests/config-fragments/aarch64 | 1 + tools/perf/tests/config-fragments/config | 11 +++++++++++ 3 files changed, 19 insertions(+) create mode 100644 tools/perf/tests/config-fragments/README create mode 100644 tools/perf/tests/config-fragments/aarch64 create mode 100644 tools/perf/tests/config-fragments/configtools/perf/tests/config-fragments/README new file +7
-0@@ -0,0 +1,7 @@ +This folder is for kernel config fragments that can be merged with +defconfig to give full test coverage of a perf test run. This is only +an optimistic set as some features require hardware support in order to +pass and not skip. + +'config' is shared across all platforms, and for arch specific files, +the file name should match that returned by 'uname -m'.tools/perf/tests/config-fragments/aarch64 new file +1
-0@@ -0,0 +1 @@ +CONFIG_CORESIGHT_SOURCE_ETM4X=ytools/perf/tests/config-fragments/config new file +11
-0@@ -0,0 +1,11 @@ +CONFIG_TRACEPOINTS=y +CONFIG_STACKTRACE=y +CONFIG_NOP_TRACER=y +CONFIG_RING_BUFFER=y +CONFIG_EVENT_TRACING=y +CONFIG_CONTEXT_SWITCH_TRACER=y +CONFIG_TRACING=y +CONFIG_GENERIC_TRACER=y +CONFIG_FTRACE=y +CONFIG_FTRACE_SYSCALLS=y +CONFIG_BRANCH_PROFILE_NONE=ySignature · 1 line
2.34.1
Quoted 8 lines · James Clark
Quoted 7 lines · Arnaldo Carvalho de Melo
Em Wed, Jun 14, 2023 at 03:02:19PM +0100, James Clark escreveu:
Quoted 6 lines
We are currently keeping something like this in our CI because defconfig doesn't give full coverage. It's not complete yet, but is a starting point as a place to add to when a specific test needs something extra to run.
The RFC is for discussion on folder placement and file naming etc.
I am wandering if we can put these configurations into kselftest (the folder tools/testing/selftests/). You could see now kernel build has already provided option to merge kernel configurations for kselftests.
Quoted 2 lines
Quoted 2 lines
Would be interesting to add the
Kconfigmaintainer to see if they have an opinion, Masahiro?
Yeah, looking forward suggestions from Masahiro.
Quoted 6 lines
Quoted 2 lines
- Arnaldo
One concern I have is that uname -m gives a different result to the ARCH= option for a kernel build (ARCH=arm64). Probably the build time version is more useful to us so maybe that should be the file name.
If we want to fit into kernel's build system, I'd like to use "arm64" rather than "aarch64" as the folder name.
Seems to me, it is a legacy issue for using "arm64" as ARCH variable in Makefile, given we cannot change this, then the folder name 'arm64' would be easier for us to extend kernel's Makefile for building kernel of perf testing?
Quoted 2 lines
Not sure what the x86 version is or if anyone is actually doing cross x86 builds...
I don't understand this question and not sure if you are asking cross builds for kernel or perf. Maybe a good reference for arch naming is the file scripts/subarch.include.
Thanks,
Leo
Quoted 51 lines
Quoted 51 lines
Quoted 50 lines
Signed-off-by James Clark <[email protected]>--- tools/perf/tests/config-fragments/README | 7 +++++++ tools/perf/tests/config-fragments/aarch64 | 1 + tools/perf/tests/config-fragments/config | 11 +++++++++++ 3 files changed, 19 insertions(+) create mode 100644 tools/perf/tests/config-fragments/README create mode 100644 tools/perf/tests/config-fragments/aarch64 create mode 100644 tools/perf/tests/config-fragments/configtools/perf/tests/config-fragments/README new file +7
-0@@ -0,0 +1,7 @@ +This folder is for kernel config fragments that can be merged with +defconfig to give full test coverage of a perf test run. This is only +an optimistic set as some features require hardware support in order to +pass and not skip. + +'config' is shared across all platforms, and for arch specific files, +the file name should match that returned by 'uname -m'.tools/perf/tests/config-fragments/aarch64 new file +1
-0@@ -0,0 +1 @@ +CONFIG_CORESIGHT_SOURCE_ETM4X=ytools/perf/tests/config-fragments/config new file +11
-0@@ -0,0 +1,11 @@ +CONFIG_TRACEPOINTS=y +CONFIG_STACKTRACE=y +CONFIG_NOP_TRACER=y +CONFIG_RING_BUFFER=y +CONFIG_EVENT_TRACING=y +CONFIG_CONTEXT_SWITCH_TRACER=y +CONFIG_TRACING=y +CONFIG_GENERIC_TRACER=y +CONFIG_FTRACE=y +CONFIG_FTRACE_SYSCALLS=y +CONFIG_BRANCH_PROFILE_NONE=ySignature · 1 line
2.34.1
Quoted 7 lines · Leo Yan
Quoted 1 line · James Clark
Quoted 1 line
Quoted 1 line
The RFC is for discussion on folder placement and file naming etc.
I am wandering if we can put these configurations into kselftest (the folder
tools/testing/selftests/). You could see now kernel build has already provided option to merge kernel configurations for kselftests.
Well, it'd be nice if the whole thing was a kselftest rather than it's own thing, that'd avoid the need for custom setup to run the tests. But while it's not a kselftest it's not clear to me that it's a good fit.