All of lore.kernel.org
 help / color / mirror / Atom feed
From: rubisher <rubisher@scarlet.be>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: linux-parisc <linux-parisc@vger.kernel.org>
Subject: How to grab begining/end functions' address? [Wa: 'Trace patches test' ]
Date: Sun, 17 Feb 2008 10:52:28 +0000	[thread overview]
Message-ID: <47B811EC.3080707@scarlet.be> (raw)
In-Reply-To: <20080123071343.GD20348@colo.lackof.org>

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.

  reply	other threads:[~2008-02-17 10:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-22 13:35 'Trace patches test' [Was: ccio_clear_io_tlb() and __raw_write() more question?] rubisher
2008-01-23  7:13 ` Grant Grundler
2008-02-17 10:52   ` rubisher [this message]
2008-02-17 14:17     ` How to grab begining/end functions' address? [Wa: 'Trace patches test' ] Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47B811EC.3080707@scarlet.be \
    --to=rubisher@scarlet.be \
    --cc=grundler@parisc-linux.org \
    --cc=linux-parisc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.