aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2011-03-16 19:04:27 -0400
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2011-03-16 19:04:27 -0400
commit36040ebd961ad67ff127f3f7f615918eaae41f1e (patch)
tree30c072c41c26521fb06ca9511943c9e298267ba7 /Documentation
parentbb8d9ad4504017c1c882543bbf460194858da2ae (diff)
downloadlinux-linaro-android-36040ebd961ad67ff127f3f7f615918eaae41f1e.tar.gz
immediate-values/linux-kernel-markers-immediate-values
Linux Kernel Markers - Use Immediate Values Make markers use immediate values. Changelog : - Use imv_* instead of immediate_*. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/markers.txt17
1 files changed, 13 insertions, 4 deletions
diff --git a/Documentation/markers.txt b/Documentation/markers.txt
index d2b3d0e91b2..951a2f342b9 100644
--- a/Documentation/markers.txt
+++ b/Documentation/markers.txt
@@ -15,10 +15,12 @@ provide at runtime. A marker can be "on" (a probe is connected to it) or "off"
(no probe is attached). When a marker is "off" it has no effect, except for
adding a tiny time penalty (checking a condition for a branch) and space
penalty (adding a few bytes for the function call at the end of the
-instrumented function and adds a data structure in a separate section). When a
-marker is "on", the function you provide is called each time the marker is
-executed, in the execution context of the caller. When the function provided
-ends its execution, it returns to the caller (continuing from the marker site).
+instrumented function and adds a data structure in a separate section). The
+immediate values are used to minimize the impact on data cache, encoding the
+condition in the instruction stream. When a marker is "on", the function you
+provide is called each time the marker is executed, in the execution context of
+the caller. When the function provided ends its execution, it returns to the
+caller (continuing from the marker site).
You can put markers at important locations in the code. Markers are
lightweight hooks that can pass an arbitrary number of parameters,
@@ -90,6 +92,13 @@ notrace void probe_tracepoint_name(unsigned int arg1, struct task_struct *tsk)
/* write data to trace buffers ... */
}
+* Optimization for a given architecture
+
+To force use of a non-optimized version of the markers, _trace_mark() should be
+used. It takes the same parameters as the normal markers, but it does not use
+the immediate values based on code patching.
+
+
* Probe / marker example
See the example provided in samples/markers/src