<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/ftrace.c, branch linux-2.6.37.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-06-20T17:56:46Z</updated>
<entry>
<title>Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-06-20T17:56:46Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2009-06-20T17:56:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0b7065b64fe517b4a50915a1555e8ee98890d64'/>
<id>urn:sha1:b0b7065b64fe517b4a50915a1555e8ee98890d64</id>
<content type='text'>
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (24 commits)
  tracing/urgent: warn in case of ftrace_start_up inbalance
  tracing/urgent: fix unbalanced ftrace_start_up
  function-graph: add stack frame test
  function-graph: disable when both x86_32 and optimize for size are configured
  ring-buffer: have benchmark test print to trace buffer
  ring-buffer: do not grab locks in nmi
  ring-buffer: add locks around rb_per_cpu_empty
  ring-buffer: check for less than two in size allocation
  ring-buffer: remove useless compile check for buffer_page size
  ring-buffer: remove useless warn on check
  ring-buffer: use BUF_PAGE_HDR_SIZE in calculating index
  tracing: update sample event documentation
  tracing/filters: fix race between filter setting and module unload
  tracing/filters: free filter_string in destroy_preds()
  ring-buffer: use commit counters for commit pointer accounting
  ring-buffer: remove unused variable
  ring-buffer: have benchmark test handle discarded events
  ring-buffer: prevent adding write in discarded area
  tracing/filters: strloc should be unsigned short
  tracing/filters: operand can be negative
  ...

Fix up kmemcheck-induced conflict in kernel/trace/ring_buffer.c manually
</content>
</entry>
<entry>
<title>function-graph: add stack frame test</title>
<updated>2009-06-18T22:40:18Z</updated>
<author>
<name>Steven Rostedt</name>
</author>
<published>2009-06-18T16:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71e308a239c098673570d0b417d42262bb535909'/>
<id>urn:sha1:71e308a239c098673570d0b417d42262bb535909</id>
<content type='text'>
In case gcc does something funny with the stack frames, or the return
from function code, we would like to detect that.

An arch may implement passing of a variable that is unique to the
function and can be saved on entering a function and can be tested
when exiting the function. Usually the frame pointer can be used for
this purpose.

This patch also implements this for x86. Where it passes in the stack
frame of the parent function, and will test that frame on exit.

There was a case in x86_32 with optimize for size (-Os) where, for a
few functions, gcc would align the stack frame and place a copy of the
return address into it. The function graph tracer modified the copy and
not the actual return address. On return from the funtion, it did not go
to the tracer hook, but returned to the parent. This broke the function
graph tracer, because the return of the parent (where gcc did not do
this funky manipulation) returned to the location that the child function
was suppose to. This caused strange kernel crashes.

This test detected the problem and pointed out where the issue was.

This modifies the parameters of one of the functions that the arch
specific code calls, so it includes changes to arch code to accommodate
the new prototype.

Note, I notice that the parsic arch implements its own push_return_trace.
This is now a generic function and the ftrace_push_return_trace should be
used instead. This patch does not touch that code.

Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>powerpc/ftrace: Use PPC_INST_NOP directly</title>
<updated>2009-06-02T00:36:53Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2009-05-28T19:33:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=92e02a5125a22a4da58090c94f520432da700d73'/>
<id>urn:sha1:92e02a5125a22a4da58090c94f520432da700d73</id>
<content type='text'>
There's no need to wrap PPC_INST_NOP in a static inline.

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/ftrace: Remove unused macros</title>
<updated>2009-06-02T00:36:46Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2009-05-28T19:33:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=898b160fe9d84b7e194c9ed0495193952909c9bd'/>
<id>urn:sha1:898b160fe9d84b7e194c9ed0495193952909c9bd</id>
<content type='text'>
These macros were used in the original port, but since commit
e4486fe316 (ftrace, use probe_kernel API to modify code) they
are unused.

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/ftrace: Use ppc_function_entry() instead of GET_ADDR</title>
<updated>2009-06-02T00:36:32Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2009-05-28T19:33:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a9e3f8e94d6740fbd3f149f2aa4caa82a6427ed'/>
<id>urn:sha1:4a9e3f8e94d6740fbd3f149f2aa4caa82a6427ed</id>
<content type='text'>
Use ppc_function_entry() from code-patching.h.

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/ftrace: Fix constraint to be early clobber</title>
<updated>2009-05-18T05:19:05Z</updated>
<author>
<name>Steven Rostedt</name>
</author>
<published>2009-05-15T04:33:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3cf8667ed7db58c1960958cbb0a9098d513cc60'/>
<id>urn:sha1:c3cf8667ed7db58c1960958cbb0a9098d513cc60</id>
<content type='text'>
After upgrading my distcc boxes from gcc 4.2.2 to 4.4.0, the function
graph tracer broke. This was discovered on my x86 boxes.

The issue is that gcc used the same register for an output as it did for
an input in an asm statement. I first thought this was a bug in gcc and
reported it. I was notified that gcc was correct and that the output had
to be flagged as an "early clobber".

I noticed that powerpc had the same issue and this patch fixes it.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/ftrace: Use pr_devel() in ftrace.c</title>
<updated>2009-05-18T05:19:04Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2009-05-13T20:30:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=021376a3b655364c92c10be544a3319946a792e8'/>
<id>urn:sha1:021376a3b655364c92c10be544a3319946a792e8</id>
<content type='text'>
pr_debug() can now result in code being generated even when #DEBUG
is not defined. That's not really desirable in the ftrace code
which we want to be snappy.

With CONFIG_DYNAMIC_DEBUG=y:

size before:
   text	   data	    bss	    dec	    hex	filename
   3334	    672	      4	   4010	    faa	arch/powerpc/kernel/ftrace.o

size after:
   text	   data	    bss	    dec	    hex	filename
   2616	    360	      4	   2980	    ba4	arch/powerpc/kernel/ftrace.o

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/ftrace: Fix printf format warning</title>
<updated>2009-04-07T05:19:00Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2009-04-06T04:40:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ddb7ad11f862f46d6d55d629a6fb45a5f4cb030'/>
<id>urn:sha1:7ddb7ad11f862f46d6d55d629a6fb45a5f4cb030</id>
<content type='text'>
'tramp' is an unsigned long, so print it with %lx.

Fixes the following build warning:
arch/powerpc/kernel/ftrace.c:291: error: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>powerpc/ftrace: Fix #if that should be #ifdef</title>
<updated>2009-04-07T05:19:00Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2009-04-06T04:40:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f4952f6cbeb025bc90906b740dc495f4817266d6'/>
<id>urn:sha1:f4952f6cbeb025bc90906b740dc495f4817266d6</id>
<content type='text'>
Commit bb7253403f7a4670a128e4c080fd8ea1bd4d5029 ("powerpc64,
ftrace: save toc only on modules for function graph"), added an
#if CONFIG_PPC64.  This changes it to #ifdef.

Fixes the following warning on 32-bit builds:
 arch/powerpc/kernel/ftrace.c:562:5: error: "CONFIG_PPC64" is not defined

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>tracing, powerpc: fix powerpc tree and tracing tree interaction</title>
<updated>2009-04-01T22:50:24Z</updated>
<author>
<name>Stephen Rothwell</name>
</author>
<published>2009-03-27T12:08:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a095bdbb136f7bed96b7adf5aa1dd27bb2f839bf'/>
<id>urn:sha1:a095bdbb136f7bed96b7adf5aa1dd27bb2f839bf</id>
<content type='text'>
Today's linux-next build (powerpc allyesconfig) failed like this:

arch/powerpc/kernel/ftrace.c: In function 'prepare_ftrace_return':
arch/powerpc/kernel/ftrace.c:612: warning: passing argument 3 of 'ftrace_push_return_trace' makes pointer from integer without a cast
arch/powerpc/kernel/ftrace.c:612: error: too many arguments to function 'ftrace_push_return_trace'

Caused by commit 5d1a03dc541dc6672e60e57249ed22f40654ca47
("function-graph: moved the timestamp from arch to generic code") from
the tracing tree which (removed an argument from
ftrace_push_return_trace()) interacting with commit
6794c78243bfda020ab184d6d578944f8e90d26c ("powerpc64: port of the
function graph tracer") from the powerpc tree.

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Steven Rostedt &lt;srostedt@redhat.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: &lt;linuxppc-dev@ozlabs.org&gt;
LKML-Reference: &lt;20090327230834.93d0221d.sfr@canb.auug.org.au&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
