How to grab begining/end functions' address? [Wa: 'Trace patches test' ]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Grant Grundler wrote:
On Tue, Jan 22, 2008 at 02:35:21PM +0100, rubisher wrote:
Btw, a while back, I dream to use relayfs to grab debug info.
(<http://lists.parisc-linux.org/pipermail/parisc-linux/2006-April/053237.html>)

Somebody else write it:
<http://lkml.org/lkml/2007/11/13/208>

Obviously, I have to instrument things manually but I test it succesfully.
Here is already some primarily data test:
[snip]
:1201001199222127606:ccio_map_single_1:ccio_map_single() 0x1eb91896 ->
0x63b4896 size: 0x1000
:1201001199222203288:ccio_map_single_2: pdir 1fcb1da0 038100000eb91017
:1201001199222391065:ccio_map_single_1:ccio_map_single() 0x1febc096 ->
0x63b5096 size: 0x1000
...
Exciting results?

Yes! Nice!

(just what would give me DEBUG_RUN() printk() but without
 degrading system performance)

I don't believe that. :)
Measure the CPU utilization and/or compare pktgen performance with
and without the tracing compiled into the kernel.

However, that doesn't mean this is useless. This is alot better than
rolling our own "light weight" tracing mechanism and it's certainly
alot better than using printk's to debug DMA issues (as long as
the system doesn't crash - e.g. HPMC).

hth,
grant

I still have to had some more DEBUG_RUN_SG() stuff and hope to be able to
collect more.

Hello Grant,

Has far as the gcc builtin instrument-functions doesn't work as I expected, I would like to grab manually the address of the functions' begin and end like something:
void foo(){
foo_start:
	printk ("%s() start at %p.\n, __FUNCTION__, ???ADDRESS_OF???(foo_start);
[snip]
foo_end:
	printk ("%s() start at %p.\n, __FUNCTION__, ???ADDRESS_OF???(foo_end);
};

It seems to me that I read it something like this in the past but no means to remember how to do it.
Can you help me to refresh my mind?

Tia,
	r.
-
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux