ARMDebuggingWithOprofileAndPerf

Differences between revisions 1 and 2
Revision 1 as of 2010-04-27 15:17:36
Size: 2636
Editor: fw-unat
Comment:
Revision 2 as of 2010-04-30 09:23:34
Size: 2182
Editor: fw-tnat
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
 * '''Created''':  * '''Created''': 30/04/10
Line 6: Line 6:
 * '''Packages affected''':  * '''Packages affected''': linux-tools, linux, oprofile
Line 10: Line 10:
This should provide an overview of the issue/functionality/change proposed here. Focus here on what will actually be DONE, summarising that so that other people don't have to read the whole spec. See also CategorySpec for examples. As of Linux 2.6.33, ARMv6 and v7 are supported architectures of the perf-events tools.
To make this functionality available to Ubuntu the following actions need to occur:

 * Backport ARM backend Kernel patches to the Ubuntu Kernel sources
 * Ensure that supported boards [Babbage and Dove] expose their hardware performance counter capabilities in their BSP code
 * Package linux-tools for ARM [may need patches for Thumb-2]

With Perf available, OProfile can be made available `for free' with the following actions:

 * Backport Kernel patches to replace the OProfile backend with perf
 * Update OProfile userspace tools to recognise Cortex-A9 and SMP platforms

There is scope for lots of future work, that needn't be ARM specific. In particular:

 * Support for `uncore' events. These are performance events not associated to a particular CPU, for example events occurring on the bus or in the L2 cache.
 * Frontend tools. The current userspace tools for Perf are largely text-based. There is scope for developing a graphical front-end, potentially with realtime capabilities, to make the performance counters easier to use.
Line 14: Line 29:
This section should include a paragraph describing the end-user impact of this change. It is meant to be included in the release notes of the first release in which it is implemented. (Not all of these will actually be included in the release notes, at the release manager's discretion; but writing them is a useful exercise.)

It is mandatory.
Hardware profiling features for ARM platforms using OProfile and Perf-events.
Line 20: Line 33:
This should cover the _why_: why is this change being proposed, what justifies it, where we see this justified.

== User stories ==

== Assumptions ==
x86/AMD64 currently have these features in Ubuntu.
Line 28: Line 37:
You can have subsections that better describe specific parts of the issue. The Kernel support required is already available in upstream repositories and on the mailing lists, so most of the backend work is already complete.
However, decisions need to be made regarding:

 * Support for `uncore' events. This was discussed on the [[http://lkml.org/lkml/2010/1/19/280|LKML]].
 * Graphical tool features and UI. This requires discussion: ''What'' do we want to visualise and ''how'' do we want to visualise it?
Line 32: Line 45:
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:  * Kernel code written, requires backporting.
 * GUI tools TBD.
Line 36: Line 50:
Should cover changes required to the UI, or specific UI that is required to implement this

=== Code Changes ===

Code changes should include an overview of what needs to change, and in some cases even the specific details.

=== Migration ===

Include:
 * data migration, if any
 * redirects from old URLs to new ones, if any
 * how users will be pointed to the new way of doing things, if necessary.

== Test/Demo Plan ==

It's important that we are able to test new features, and demonstrate them to users. Use this section to describe a short plan that anybody can follow that demonstrates the feature is working. This can then be used during testing, and to show off after release. Please add an entry to http://testcases.qa.ubuntu.com/Coverage/NewFeatures for tracking test coverage.

This need not be added or completed until the specification is nearing beta.

== Unresolved issues ==

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

== BoF agenda and discussion ==

Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.

----
CategorySpec
TBD

Summary

As of Linux 2.6.33, ARMv6 and v7 are supported architectures of the perf-events tools. To make this functionality available to Ubuntu the following actions need to occur:

  • Backport ARM backend Kernel patches to the Ubuntu Kernel sources
  • Ensure that supported boards [Babbage and Dove] expose their hardware performance counter capabilities in their BSP code
  • Package linux-tools for ARM [may need patches for Thumb-2]

With Perf available, OProfile can be made available `for free' with the following actions:

  • Backport Kernel patches to replace the OProfile backend with perf
  • Update OProfile userspace tools to recognise Cortex-A9 and SMP platforms

There is scope for lots of future work, that needn't be ARM specific. In particular:

  • Support for `uncore' events. These are performance events not associated to a particular CPU, for example events occurring on the bus or in the L2 cache.
  • Frontend tools. The current userspace tools for Perf are largely text-based. There is scope for developing a graphical front-end, potentially with realtime capabilities, to make the performance counters easier to use.

Release Note

Hardware profiling features for ARM platforms using OProfile and Perf-events.

Rationale

x86/AMD64 currently have these features in Ubuntu.

Design

The Kernel support required is already available in upstream repositories and on the mailing lists, so most of the backend work is already complete. However, decisions need to be made regarding:

  • Support for `uncore' events. This was discussed on the LKML.

  • Graphical tool features and UI. This requires discussion: What do we want to visualise and how do we want to visualise it?

Implementation

  • Kernel code written, requires backporting.
  • GUI tools TBD.

UI Changes

TBD

Specs/M/ARMDebuggingWithOprofileAndPerf (last edited 2010-06-01 12:35:09 by fw-tnat)