Message ID | 20250903124920.1922332-1-ross.burton@arm.com |
---|---|
State | New |
Headers | show |
Series | perf: enable coresight if enabled in MACHINE_FEATURES | expand |
On Wed, Sep 3, 2025 at 8:49 AM Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > Enable the CoreSight[1] functionality in perf[2] if 'coresight' is in the > MACHINE_FEATURES. > > Note that enabling this will mean a dependency on the opencsd recipe, > which is currently part of meta-arm[3]. I don't think this is a problem > as this recipe is Arm-specific, and as this is a new feature the > behaviour is opt-in so shouldn't break any existing machines. > I don't have a problem with that arrangement. I could see if it was widespread, or if the AB needed to use it on tests where meta-arm wasn't available, then the cost of getting opencsd into core would be worth it .. but since that isn't the cas and meta-arm being a maintained and well behaved layer, I have no objections. Would a comment above the PACKAGECONFIG help warn someone that enabling it does add a dependency on meta-arm ? Or do we expect that anyone trying this will already have meta-arm and be knowledgeable enough to sort it out if they don't ? Bruce > > [1] https://docs.kernel.org/trace/coresight/coresight.html > [2] https://docs.kernel.org/trace/coresight/coresight-perf.html > [3] > https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-devtools/opencsd > > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- > meta/recipes-kernel/perf/perf.bb | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/ > perf.bb > index 4f29bd5bbc3..194c30831dd 100644 > --- a/meta/recipes-kernel/perf/perf.bb > +++ b/meta/recipes-kernel/perf/perf.bb > @@ -10,7 +10,7 @@ HOMEPAGE = " > https://perf.wiki.kernel.org/index.php/Main_Page" > LICENSE = "GPL-2.0-only" > > # zstd is required for kernels 6.14+ when libelf-zstd is detected > -PACKAGECONFIG ??= "python tui libunwind libtraceevent zstd" > +PACKAGECONFIG ??= "python tui libunwind libtraceevent zstd > ${@bb.utils.filter('MACHINE_FEATURES', 'coresight', d)}" > PACKAGECONFIG[dwarf] = ",NO_DWARF=1" > PACKAGECONFIG[perl] = ",NO_LIBPERL=1,perl" > PACKAGECONFIG[python] = ",NO_LIBPYTHON=1,python3 > python3-setuptools-native" > -- > 2.43.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#222859): > https://lists.openembedded.org/g/openembedded-core/message/222859 > Mute This Topic: https://lists.openembedded.org/mt/115044194/1050810 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > bruce.ashfield@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 4f29bd5bbc3..194c30831dd 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -10,7 +10,7 @@ HOMEPAGE = "https://perf.wiki.kernel.org/index.php/Main_Page" LICENSE = "GPL-2.0-only" # zstd is required for kernels 6.14+ when libelf-zstd is detected -PACKAGECONFIG ??= "python tui libunwind libtraceevent zstd" +PACKAGECONFIG ??= "python tui libunwind libtraceevent zstd ${@bb.utils.filter('MACHINE_FEATURES', 'coresight', d)}" PACKAGECONFIG[dwarf] = ",NO_DWARF=1" PACKAGECONFIG[perl] = ",NO_LIBPERL=1,perl" PACKAGECONFIG[python] = ",NO_LIBPYTHON=1,python3 python3-setuptools-native"
Enable the CoreSight[1] functionality in perf[2] if 'coresight' is in the MACHINE_FEATURES. Note that enabling this will mean a dependency on the opencsd recipe, which is currently part of meta-arm[3]. I don't think this is a problem as this recipe is Arm-specific, and as this is a new feature the behaviour is opt-in so shouldn't break any existing machines. [1] https://docs.kernel.org/trace/coresight/coresight.html [2] https://docs.kernel.org/trace/coresight/coresight-perf.html [3] https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-devtools/opencsd Signed-off-by: Ross Burton <ross.burton@arm.com> --- meta/recipes-kernel/perf/perf.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)