Enable basic profiling & tracing options in kernel configuation

Bug #764796 reported by Paweł Moll
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linaro-landing-team-ti
Fix Released
High
Unassigned
linux-linaro-vexpress (Ubuntu)
Confirmed
Undecided
John Rigby

Bug Description

Could we have basic profiling & tracing options enabled in Linaro kernel? I'd suggest:

CONFIG_HIGH_RES_TIMERS=y (for using hrtimers as a sampling clock)
CONFIG_LOCAL_TIMERS=y (for A9 targets, otherwise hrtimers don't work)
CONFIG_PROFILING=y
CONFIG_PERF_EVENTS=y
CONFIG_HW_PERF_EVENTS=y
CONFIG_FTRACE=y
CONFIG_TRACING=y and/or CONFIG_GENERIC_TRACER=y (enabled by any tracer, eg. when ENABLE_DEFAULT_TRACERS=y)

Revision history for this message
John Rigby (jcrigby) wrote :

Should these be on for all platforms or are there problems for example with THUMB2 kernel?

Revision history for this message
Paweł Moll (pawel-moll) wrote :

I'm not aware of any problems like that. There used to be some problems with FTRACE and some userspace tools, but it was mostly about symbol de-mangling, so in other words it doesn't break anything else.

I've just spoken to Will Deacon and he has similar opinion, so yes - I'd say let's enable all of this on all platforms.

Now, I had a look at OMAP flavour configuration and all the relevant options are already enabled there. Note that the "CONFIG_ENABLE_DEFAULT_TRACERS" is not available there, because other tracers are enabled and they select the "CONFIG_GENERIC_TRACER" option (that's the one we really care about ;-). It's all described in commit 5e0a093910876882f91f1d4b8a1635a099e6c7ba "tracing: fix config options to not show when automatically selected" in the main line.

Loïc Minier (lool)
Changed in linux-linaro-vexpress (Ubuntu):
assignee: nobody → John Rigby (jcrigby)
Paweł Moll (pawel-moll)
description: updated
Revision history for this message
Paweł Moll (pawel-moll) wrote :

I just had a look at all the different kernels in https://launchpad.net/~linaro-maintainers/+archive/kernel and the configurations are still very different:

                        lt-mx5 mx5 vexpress omap lt-omap
HIGH_RES_TIMERS + + - + +
LOCAL_TIMERS N/A N/A + + +
PROFILING + - + + +
PERF_EVENTS + - - + -
HW_PERF_EVENTS + - + + -
FTRACE - - + + +
TRACING/GENERIC_TRACER - - - + +

In result only the "omap" image is fully useful for profiling tasks (either with perf or Streamline). Also, I really wonder how the gator-module-* packages in the DS-5 PPA (https://launchpad.net/~linaro-maintainers/+archive/arm-ds5) build at all, as they need the above options being set...

And, generally, wouldn't it be a good idea to unify kernel configuration (I mean the non-platform-dependent bits) across LTs and Platforms builds? As we are heading in the direction of Single Kernel to Rule Them All, this will be needed at some point of time anyway.

The config files I've extracted from the debs and checked:

config-2.6.38-1400-linaro-lt-mx5
config-3.0.0-1001-linaro-mx51
config-3.0.0-1001-linaro-vexpress
config-3.0.0-1007-linaro-omap
config-3.0.0-1402-linaro-lt-omap

$ grep CONFIG_HIGH_RES_TIMERS=y *
config-2.6.38-1400-linaro-lt-mx5:CONFIG_HIGH_RES_TIMERS=y
config-3.0.0-1001-linaro-mx51:CONFIG_HIGH_RES_TIMERS=y
config-3.0.0-1007-linaro-omap:CONFIG_HIGH_RES_TIMERS=y
config-3.0.0-1402-linaro-lt-omap:CONFIG_HIGH_RES_TIMERS=y
$ grep CONFIG_LOCAL_TIMERS=y *
config-3.0.0-1001-linaro-vexpress:CONFIG_LOCAL_TIMERS=y
config-3.0.0-1007-linaro-omap:CONFIG_LOCAL_TIMERS=y
config-3.0.0-1402-linaro-lt-omap:CONFIG_LOCAL_TIMERS=y
$ grep CONFIG_PROFILING=y *
config-2.6.38-1400-linaro-lt-mx5:CONFIG_PROFILING=y
config-3.0.0-1001-linaro-vexpress:CONFIG_PROFILING=y
config-3.0.0-1007-linaro-omap:CONFIG_PROFILING=y
config-3.0.0-1402-linaro-lt-omap:CONFIG_PROFILING=y
$ grep CONFIG_PERF_EVENTS=y *
config-2.6.38-1400-linaro-lt-mx5:CONFIG_PERF_EVENTS=y
config-3.0.0-1001-linaro-vexpress:CONFIG_PERF_EVENTS=y
config-3.0.0-1007-linaro-omap:CONFIG_PERF_EVENTS=y
$ grep CONFIG_HW_PERF_EVENTS=y *
config-2.6.38-1400-linaro-lt-mx5:CONFIG_HW_PERF_EVENTS=y
config-3.0.0-1001-linaro-vexpress:CONFIG_HW_PERF_EVENTS=y
config-3.0.0-1007-linaro-omap:CONFIG_HW_PERF_EVENTS=y
$ grep CONFIG_FTRACE=y *
config-3.0.0-1001-linaro-vexpress:CONFIG_FTRACE=y
config-3.0.0-1007-linaro-omap:CONFIG_FTRACE=y
config-3.0.0-1402-linaro-lt-omap:CONFIG_FTRACE=y
$ grep -e "\(CONFIG_TRACING=y\|CONFIG_GENERIC_TRACER=y\)" *
config-3.0.0-1007-linaro-omap:CONFIG_GENERIC_TRACER=y
config-3.0.0-1007-linaro-omap:CONFIG_TRACING=y
config-3.0.0-1402-linaro-lt-omap:CONFIG_TRACING=y

Revision history for this message
Vinod Krishnamoni (vinod-krishnamoni) wrote :

This is quite critical to ARM, not just from the point of view of supporting the DS-5 profiling tools but OSS profiling tools like perf as well, across silicon from different partners. Having different kernel configurations for the different Linaro kernel trees makes the images inconsistent and breaks the consolidation story.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-linaro-vexpress (Ubuntu):
status: New → Confirmed
Changed in linaro-landing-team-freescale:
status: New → Confirmed
Revision history for this message
warmcat (andy-warmcat) wrote :

We've changed our omap4_defconfig to support the listed features on tilt-tracking branch

http://git.linaro.org/gitweb?p=people/andygreen/kernel-tilt.git;a=shortlog;h=refs/heads/tilt-tracking

in a few days when 3.1 releases that config should filter down to all the other trees based on TILT 3.1 release.

One quirk was that in order to get CONFIG_HW_PERF_EVENTS enabled we had to disable OMAP3 ARCH builds.

Revision history for this message
Anmar Oueja (anmar) wrote :

Vinod: I pinged the other LTs and Scott to get their feedback on this issue.

warmcat (andy-warmcat)
Changed in linaro-landing-team-ti:
status: New → In Progress
Revision history for this message
Eric Miao (eric.y.miao) wrote :

Except for CONFIG_LOCAL_TIMERS, which isn't applicable for i.MX53 with only a single A8 core, the other config options have been verified all turned on for the Freescale LT's v3.1 based kernel, and will be available in the 2011.10 monthly release.

Changed in linaro-landing-team-freescale:
assignee: nobody → Eric Miao (eric.y.miao)
importance: Undecided → High
milestone: none → 2011.10
status: Confirmed → Fix Committed
Lee Jones (lag)
Changed in linaro-landing-team-ste:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Philippe Langlais (philang)
Lee Jones (lag)
Changed in linaro-landing-team-ste:
assignee: Philippe Langlais (philang) → Lee Jones (lag)
Anmar Oueja (anmar)
Changed in linaro-landing-team-ste:
status: Confirmed → Fix Committed
Revision history for this message
David Long (dave-long) wrote :

If perf is to work properly with the PMU counters we have to unrevert the revert of the PMU interrupt code commit. I have a commit to do this (to put the slightly refactored code back actually) queued up for the tilt repo.

This code was originally reverted due to some people seeing a hang on boot. If we are to turn this code back on we need to watch for this, but this needs to be done if perf is to be very useful.

Note that none of this addresses the oprofile counter issue (recorded elsewhere), which is ultimately unfixable in software.

Anmar Oueja (anmar)
Changed in linaro-landing-team-ti:
milestone: none → 2011.11
importance: Undecided → High
warmcat (andy-warmcat)
Changed in linaro-landing-team-ti:
status: In Progress → Fix Committed
Revision history for this message
Anmar Oueja (anmar) wrote :

ST-Ericsson LT : Fixed for 2011.11 release.

warmcat (andy-warmcat)
Changed in linaro-landing-team-ti:
status: Fix Committed → Fix Released
Anmar Oueja (anmar)
Changed in linaro-landing-team-ste:
status: Fix Committed → Fix Released
Fathi Boudra (fboudra)
Changed in linaro-landing-team-freescale:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.