Difference between revisions of "Ftrace Function Graph ARM"

From eLinux.org
Jump to: navigation, search
(Patches)
m
 
(2 intermediate revisions by one other user not shown)
Line 24: Line 24:
  
 
== Patches ==
 
== Patches ==
Below are patches for the function graph support and function duration tracer, for two kernel versions.
+
Below are patches for the function graph support and function duration tracer, for multiple kernel versions.
  
 +
=== 2.6.33 patches ===
 +
Here are some patches to add support for the function_graph tracer to
 +
ARM, and to add support for 'tracing_thresh' to the function_graph tracer.
 +
 +
* [[Media:Function-graph-ARM-w-thresh-2.6.33-mar-2010.tgz]]
 +
 +
To apply, extract the patches and the series file.  If you have 'quilt', extract
 +
the file directly into the top level of the kernel source tree (the top directory
 +
is called 'patches').  Then do "quilt push -a".
 +
 +
If you don't have quilt, apply the patches manually, in the order specified in the
 +
'series' file, with a command like: "patch -p1 <patches/foo.patch"
  
 
=== 2.6.32-rc5 patches ===
 
=== 2.6.32-rc5 patches ===
Line 37: Line 49:
 
'series' file, with a command like: "patch -p1 <patches/foo.patch"
 
'series' file, with a command like: "patch -p1 <patches/foo.patch"
  
=== 2.6.33 patches ===
 
The following patches are available for 2.6.33:
 
 
* [[Media:Arm-check_clock-notrace-33.patch]]
 
* [[Media:Add-function-graph-tracer-support-for-ARM-33.patch]]
 
* [[Media:Add-function-names-to-dangling-function-exits.patch]]
 
* [[Media:Add-support-for-thresh-to-function_graph.patch]]
 
  
 
=== 2.6.31-rc1 patches ===
 
=== 2.6.31-rc1 patches ===
Line 111: Line 116:
  
 
If you don't see it in mainline, just send me an e-mail asking about the status.
 
If you don't see it in mainline, just send me an e-mail asking about the status.
 +
 +
[[Category:Development Tools]]

Latest revision as of 09:55, 27 October 2011

This page holds information from Tim Bird's talk at Linux Symposium Montreal (July, 2009), and at ELC Europe and the Japan Linux Symposium (October, 2009).

In Canada, Tim talked about patches against the 2.6.31-rc1 kernel tree for adding function graph tracing to the ARM architecture, for the Ftrace system.

In France and Japan, Tim talked about patches against 2.6.32-rc5.

Presentation

Here is the presentation from the Japan Linux Symposium (also given at ELC Europe, in Grenoble France)

Here is the presentation from the Canada Linux Symposium session:

Paper

Here is Tim's paper for the Canada Linux Symposium for this work:

Documentation

See the file Documentation/trace/func-duration.txt, after applying the patches.

(Or, if you applied the 2.6.31 patches, see the file Documentation/trace/func-graph.txt However, this version is deprecated.)

Patches

Below are patches for the function graph support and function duration tracer, for multiple kernel versions.

2.6.33 patches

Here are some patches to add support for the function_graph tracer to ARM, and to add support for 'tracing_thresh' to the function_graph tracer.

To apply, extract the patches and the series file. If you have 'quilt', extract the file directly into the top level of the kernel source tree (the top directory is called 'patches'). Then do "quilt push -a".

If you don't have quilt, apply the patches manually, in the order specified in the 'series' file, with a command like: "patch -p1 <patches/foo.patch"

2.6.32-rc5 patches

To apply, extract the patches and the series file. If you have 'quilt', extract the file directly into the top level of the kernel source tree (the top directory is called 'patches'). Then do "quilt push -a".

If you don't have quilt, apply the patches manually, in the order specified in the 'series' file, with a command like: "patch -p1 <patches/foo.patch"


2.6.31-rc1 patches

The following patches were submitted to the kernel mailing list in early July 2009. There are patches against kernel version 2.6.31-rc1.

2.6.29 patches

The following patches were developed internally at Sony, but never submitted to mainline. They are posted here in the hopes that they will be useful to someone.

This tar archive contains a patches directory, with a series file and several patch files. To use, extract at the source of your 2.6.29 kernel tree, and apply using quilt with 'quilt push -a'.

Alternatively, apply the patches individually using 'patch -p1 <patches/p1.patch', for each file listed in patches/series (in the order specified in the file).

This patch set was tested against a stock (mainline, from kernel.org) 2.6.29 kernel, on an OMAP OSK development board (ARM-based, TI OMAP chip).

patches for gcc 4.4.0

Note recent ARM toolchains instrument the code with calls to '__gnu_mcount_nc' instead of 'mcount'. If you get a compiler warning about missing the symbol '__gnu_mcount_nc', you should apply the patch mentioned in this e-mail also: (http://marc.info/?l=linux-arm-kernel&m=124946219616111&w=2)

[Thanks to Jean Pihet of MontaVista for pointing this out]

Here is the above patch, and a patch which adds support for __gnu_mcount_nc to the function_graph tracer.

Tools

FDD

The 'fdd' tool is now incorporated into the patch set, and is located in the kernel scripts directory after applying the patches. See the documentation in the kernel tree for instructions for use.

FTD

To install:

* Download
* rename to 'ftd': mv Ftd.txt ftd
* make it executable: chmod a+x
* Put it on your path somewhere: sudo mv ftd /usr/local/bin

History

Based on feeback from ftrace developers on the kernel mailing list, and from other developers at the tracing mini-summit in Montreal, I started working on an updated duration tracer, using a different filtering approach. This work was completed, and resulted in a new trace, the "function_duration" tracer, being completed in September of 2009.

This work was described at ELC Europe and the Japan Linux Symposium, in October, 2009. I was hoping to mainline the patches before the events, but ran out of time due to bugs on my main testing platform.

Further Work

I need to try to mainline this feature. I'd like to get it into Linux-tip or Linux-next sometime before the 2.6.33 merge window.

If you don't see it in mainline, just send me an e-mail asking about the status.