TEXT   60

arm m debugging with oprofile and perf

Guest on 28th May 2022 03:12:31 PM

  1. slides: https://wiki.ubuntu.com/Specs/M/ARMDebuggingWithOprofileAndPerf
  3. === Discussion ===
  4.  * platform device infrastructure used for performance monitor unit (PMU) - simple to new, but not typically present for new BSPs --- BSP maintainers need to add it.
  5.  * Probably doesn't work in QEMU.
  6.  * Hardware typically has many counters all over the system -- not currently clear how to export all of this through perfevents. The various parts of the hardware might
  7.    be asynchronous in terms of measuring the events and hence tying it to a frame of reference is a hard problem.
  8.  * What are the usecases for the other counters on the system ?
  9.   * L2 cache is probably the easiest "uncore" event to handle.
  10.   * "uncore" events not a solved problem on any architecture yet -- easy to put in the kernel, but the tools don't really understand non-CPU-specific events yet.
  11.   * may be able to include data about event sources in sysfs
  12.  * kiko: graphing performance profile data over time could be useful
  13.  * linux-tools (see http://packages.ubuntu.com/lucid/linux-tools) is not currently built for ARM, but ought to be straightforward.
  14.  * Tools are in the kernel tree - packaged specific to a kernel version
  15.  * Restrict number of running processes and create a stable "environment"
  17. GUIs and frontends
  18.  * The only "GUI" is an SVG generation backend - SVGs tend to be impossible to open if profiling has been run for sufficient time (too much data?)
  19.  * "perf top" command (from linux-tools?) provides real-time view of profiling data on the console.
  20.  * "perf record <command>" runs <command>, capturing profiling data
  21.  * "perf report" reports results
  22.  * "perf annotate" produces source, annotated with profiling data
  23.  * "perf list" lists the event types supported by the system
  24.  * "perf stat" gives overall statistics for a profiling run
  25.  * Tools may not understand getting symbols from ddebs yet (separated debug symbol information packages in Ubuntu)
  26.  * ddebs are not generated for all packages yet, not generated in all archives (e.g., Debian) and not generated for PPAs right now.  It would be useful to enable ddeb generation more widely.
  28.  * A converter tools may exist in kcachegrind to convert profiling data.
  30. Portability
  31.  * Userspace tools need to understand what event types exist per platform
  32.  * May not be feasible for the kernel to export this database to userspace --- it may be large for some platforms, including ARM.
  34.  * These tools are not so good at displaying multiple event types simultaneously in a useful way -- an integrated GUI would be nice, but doesn't exist yet.
  36. Streaming
  37.  * Could be useful to stream perf data off a client machine to be processed remotely at a server.
  38.  * Looks feasible, but not implemented yet?
  39.  * Data has headers which need to be parsed up-front, but the main data is a stream and can be processed incrementally over time.
  40.  * Should be possible to extract ddebs on the server (which may be a foreign architecture), but this may not work out of the box.  Cross-/multi-arch binutils would also be needed on the server.
  43. === Action Items ===
  44.  * Will Deacon: update oprofile userspace
  45.  * Will Deacon: create / provide link to wiki page documenting how to enable perf event support for a new platform.
  46.  * Will Deacon: if a vmlinux file needed to profile inside the kernel?
  47.  * Loic Minier: Enable linux-tools building for armel.  Packages may be needed per-platform (i.e., per kernel tree)
  48.  * Dave Martin: Teach the perf userspace tools how to get symbol information out of ddebs, not necessarily on /usr/lib/debug (for cross-arch support).
  49.  * scottb: Work out how to get cross-profiling to work (getting the right binaries and debug symbol archives onto the server).  Use sshfs to access the target's filesystem? (but may be a space issue)

Raw Paste

Login or Register to edit or fork this paste. It's free.