<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/trace_uprobe.c, branch v3.14-rc7</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/trace/trace_uprobe.c?h=v3.14-rc7</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/trace/trace_uprobe.c?h=v3.14-rc7'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-01-03T20:27:18Z</updated>
<entry>
<title>tracing/probes: Fix build break on !CONFIG_KPROBE_EVENT</title>
<updated>2014-01-03T20:27:18Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2014-01-03T05:12:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e0d18fe063464cb3f1a6d1939e4fcf47d92d8386'/>
<id>urn:sha1:e0d18fe063464cb3f1a6d1939e4fcf47d92d8386</id>
<content type='text'>
When kprobe-based dynamic event tracer is not enabled, it caused
following build error:

   kernel/built-in.o: In function `traceprobe_update_arg':
   (.text+0x10c8dd): undefined reference to `fetch_symbol_u8'
   kernel/built-in.o: In function `traceprobe_update_arg':
   (.text+0x10c8e9): undefined reference to `fetch_symbol_u16'
   kernel/built-in.o: In function `traceprobe_update_arg':
   (.text+0x10c8f5): undefined reference to `fetch_symbol_u32'
   kernel/built-in.o: In function `traceprobe_update_arg':
   (.text+0x10c901): undefined reference to `fetch_symbol_u64'
   kernel/built-in.o: In function `traceprobe_update_arg':
   (.text+0x10c909): undefined reference to `fetch_symbol_string'
   kernel/built-in.o: In function `traceprobe_update_arg':
   (.text+0x10c913): undefined reference to `fetch_symbol_string_size'
   ...

It was due to the fetch methods are referred from CHECK_FETCH_FUNCS
macro and since it was only defined in trace_kprobe.c.  Move NULL
definition of such fetch functions to the header file.

Note, it also requires CONFIG_BRANCH_PROFILING enabled to trigger
this failure as well. This is because the "fetch_symbol_*" variables
are referenced in a "else if" statement that will only call
update_symbol_cache(), which is a static inline stub function
when CONFIG_KPROBE_EVENT is not enabled. gcc is smart enough
to optimize this "else if" out and that also removes the code that
references the undefined variables.

But when BRANCH_PROFILING is enabled, it fools gcc into keeping
the if statement around and thus references the undefined symbols
and fails to build.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing/uprobes: Add @+file_offset fetch method</title>
<updated>2014-01-03T01:57:05Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-11-25T04:42:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b7e0bf341f6cfa92ae0a0e3d0c3496729595e1e9'/>
<id>urn:sha1:b7e0bf341f6cfa92ae0a0e3d0c3496729595e1e9</id>
<content type='text'>
Enable to fetch data from a file offset.  Currently it only supports
fetching from same binary uprobe set.  It'll translate the file offset
to a proper virtual address in the process.

The syntax is "@+OFFSET" as it does similar to normal memory fetching
(@ADDR) which does no address translation.

Suggested-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Cc: zhangwei(Jovi) &lt;jovi.zhangwei@huawei.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>tracing/uprobes: Fetch args before reserving a ring buffer</title>
<updated>2014-01-02T21:17:44Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-07-03T07:40:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dcad1a204f72624796ae83359403898d10393b9c'/>
<id>urn:sha1:dcad1a204f72624796ae83359403898d10393b9c</id>
<content type='text'>
Fetching from user space should be done in a non-atomic context.  So
use a per-cpu buffer and copy its content to the ring buffer
atomically.  Note that we can migrate during accessing user memory
thus use a per-cpu mutex to protect concurrent accesses.

This is needed since we'll be able to fetch args from an user memory
which can be swapped out.  Before that uprobes could fetch args from
registers only which saved in a kernel space.

While at it, use __get_data_size() and store_trace_args() to reduce
code duplication.  And add struct uprobe_cpu_buffer and its helpers as
suggested by Oleg.

Reviewed-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Cc: zhangwei(Jovi) &lt;jovi.zhangwei@huawei.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>tracing/uprobes: Pass 'is_return' to traceprobe_parse_probe_arg()</title>
<updated>2014-01-02T21:17:43Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-11-27T02:36:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a4734145a4771ffa0cd5ef283a5cfd03b30bedf3'/>
<id>urn:sha1:a4734145a4771ffa0cd5ef283a5cfd03b30bedf3</id>
<content type='text'>
Currently uprobes don't pass is_return to the argument parser so that
it cannot make use of "$retval" fetch method since it only works for
return probes.

Reviewed-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Cc: zhangwei(Jovi) &lt;jovi.zhangwei@huawei.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>tracing/probes: Implement 'memory' fetch method for uprobes</title>
<updated>2014-01-02T21:17:43Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-11-26T06:21:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5baaa59ef09e8729aef101f7bf7d9d0af00852e3'/>
<id>urn:sha1:5baaa59ef09e8729aef101f7bf7d9d0af00852e3</id>
<content type='text'>
Use separate method to fetch from memory.  Move existing functions to
trace_kprobe.c and make them static.  Also add new memory fetch
implementation for uprobes.

Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Cc: zhangwei(Jovi) &lt;jovi.zhangwei@huawei.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>tracing/probes: Move 'symbol' fetch method to kprobes</title>
<updated>2014-01-02T21:17:41Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-11-26T06:21:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1301a44e77557e928700f91c7083c5770054c212'/>
<id>urn:sha1:1301a44e77557e928700f91c7083c5770054c212</id>
<content type='text'>
Move existing functions to trace_kprobe.c and add NULL entries to the
uprobes fetch type table.  I don't make them static since some generic
routines like update/free_XXX_fetch_param() require pointers to the
functions.

Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Cc: zhangwei(Jovi) &lt;jovi.zhangwei@huawei.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>tracing/probes: Implement 'stack' fetch method for uprobes</title>
<updated>2014-01-02T21:17:40Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-11-26T06:21:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3fd996a29515df23b3f20c36d69788a3707254a9'/>
<id>urn:sha1:3fd996a29515df23b3f20c36d69788a3707254a9</id>
<content type='text'>
Use separate method to fetch from stack.  Move existing functions to
trace_kprobe.c and make them static.  Also add new stack fetch
implementation for uprobes.

Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Cc: zhangwei(Jovi) &lt;jovi.zhangwei@huawei.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>tracing/probes: Split [ku]probes_fetch_type_table</title>
<updated>2014-01-02T21:17:39Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-11-26T05:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=34fee3a104cea1c4b658e51836e4bcd99bd76c70'/>
<id>urn:sha1:34fee3a104cea1c4b658e51836e4bcd99bd76c70</id>
<content type='text'>
Use separate fetch_type_table for kprobes and uprobes.  It currently
shares all fetch methods but some of them will be implemented
differently later.

This is not to break build if [ku]probes is configured alone (like
!CONFIG_KPROBE_EVENT and CONFIG_UPROBE_EVENT).  So I added '__weak'
to the table declaration so that it can be safely omitted when it
configured out.

Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Cc: zhangwei(Jovi) &lt;jovi.zhangwei@huawei.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>tracing/probes: Integrate duplicate set_print_fmt()</title>
<updated>2014-01-02T21:17:38Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-07-03T07:09:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5bf652aaf46ca6ae477ea0d162e68d577cf244aa'/>
<id>urn:sha1:5bf652aaf46ca6ae477ea0d162e68d577cf244aa</id>
<content type='text'>
The set_print_fmt() functions are implemented almost same for
[ku]probes.  Move it to a common place and get rid of the duplication.

Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Cc: zhangwei(Jovi) &lt;jovi.zhangwei@huawei.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>tracing/uprobes: Convert to struct trace_probe</title>
<updated>2014-01-02T21:17:36Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung.kim@lge.com</email>
</author>
<published>2013-07-03T06:42:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=14577c39927f86e3dba967f9b511f4a876b7f8bb'/>
<id>urn:sha1:14577c39927f86e3dba967f9b511f4a876b7f8bb</id>
<content type='text'>
Convert struct trace_uprobe to make use of the common trace_probe
structure.

Reviewed-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Acked-by: Srikar Dronamraju &lt;srikar@linux.vnet.ibm.com&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: zhangwei(Jovi) &lt;jovi.zhangwei@huawei.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
</feed>
