~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to Documentation/trace/kprobetrace.txt

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
  +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**)
43
43
  NAME=FETCHARG : Set NAME as the argument name of FETCHARG.
44
44
  FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types
45
 
                  (u8/u16/u32/u64/s8/s16/s32/s64) and string are supported.
 
45
                  (u8/u16/u32/u64/s8/s16/s32/s64), "string" and bitfield
 
46
                  are supported.
46
47
 
47
48
  (*) only for return probe.
48
49
  (**) this is useful for fetching a field of data structures.
49
50
 
 
51
Types
 
52
-----
 
53
Several types are supported for fetch-args. Kprobe tracer will access memory
 
54
by given type. Prefix 's' and 'u' means those types are signed and unsigned
 
55
respectively. Traced arguments are shown in decimal (signed) or hex (unsigned).
 
56
String type is a special type, which fetches a "null-terminated" string from
 
57
kernel space. This means it will fail and store NULL if the string container
 
58
has been paged out.
 
59
Bitfield is another special type, which takes 3 parameters, bit-width, bit-
 
60
offset, and container-size (usually 32). The syntax is;
 
61
 
 
62
 b<bit-width>@<bit-offset>/<container-size>
 
63
 
50
64
 
51
65
Per-Probe Event Filtering
52
66
-------------------------
106
120
        field:unsigned char common_flags;       offset:2;       size:1; signed:0;
107
121
        field:unsigned char common_preempt_count;       offset:3; size:1;signed:0;
108
122
        field:int common_pid;   offset:4;       size:4; signed:1;
109
 
        field:int common_lock_depth;    offset:8;       size:4; signed:1;
110
123
 
111
124
        field:unsigned long __probe_ip; offset:12;      size:4; signed:0;
112
125
        field:int __probe_nargs;        offset:16;      size:4; signed:1;