public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* which function is instrumentable?
@ 2011-03-23  1:22 Zhiwei Ying
  2011-03-23  7:49 ` Adrien Kunysz
  0 siblings, 1 reply; 4+ messages in thread
From: Zhiwei Ying @ 2011-03-23  1:22 UTC (permalink / raw)
  To: systemtap

Hi,

I tried to trace down every function in a device driver, but it fails.
It may be cased too many instrumentation. But the problem is how can I
know which function is instrumentable and which is not? Or I have to
manually narrow the problem? Any idea?

Thanks,
Zhiwei

Error msg:
bad: scheduling from the idle thread!
Pid: 0, comm: swapper Tainted: G        W   2.6.35 #8
Call Trace:
 [<c102562d>] ? dequeue_task_idle+0x1d/0x30
 [<c102ae12>] ? dequeue_task+0x42/0x60
 [<c102ae4d>] ? deactivate_task+0x1d/0x30
 [<c14304ff>] ? schedule+0x25f/0x650
 [<c1432dd6>] ? apic_timer_interrupt+0x2a/0x30
 [<c16000d8>] ? addrconf_init+0x49/0x147
 [<c1001c61>] ? cpu_idle+0x51/0x70
 [<c15d48a7>] ? start_kernel+0x2c4/0x2ca
 [<c15d441f>] ? unknown_bootoption+0x0/0x192
bad: scheduling from the idle thread!
Pid: 0, comm: swapper Tainted: G        W   2.6.35 #8
Call Trace:
 [<c102562d>] ? dequeue_task_idle+0x1d/0x30
 [<c102ae12>] ? dequeue_task+0x42/0x60
 [<c102ae4d>] ? deactivate_task+0x1d/0x30
 [<c14304ff>] ? schedule+0x25f/0x650
 [<c1432dd6>] ? apic_timer_interrupt+0x2a/0x30
 [<c16000d8>] ? addrconf_init+0x49/0x147
 [<c1001c61>] ? cpu_idle+0x51/0x70
 [<c15d48a7>] ? start_kernel+0x2c4/0x2ca
 [<c15d441f>] ? unknown_bootoption+0x0/0x192

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: which function is instrumentable?
  2011-03-23  1:22 which function is instrumentable? Zhiwei Ying
@ 2011-03-23  7:49 ` Adrien Kunysz
  2011-03-23  8:23   ` Zhiwei Ying
  0 siblings, 1 reply; 4+ messages in thread
From: Adrien Kunysz @ 2011-03-23  7:49 UTC (permalink / raw)
  To: Zhiwei Ying; +Cc: systemtap

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

On Wed, Mar 23, 2011 at 09:22:12AM +0800, Zhiwei Ying wrote:
> I tried to trace down every function in a device driver, but it fails.
> It may be cased too many instrumentation. But the problem is how can I
> know which function is instrumentable and which is not? Or I have to
> manually narrow the problem? Any idea?

This

	$ stap -l 'module("foo").function("*")'

is supposed to give you a list of all the "probeable" functions in
module "foo".

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: which function is instrumentable?
  2011-03-23  7:49 ` Adrien Kunysz
@ 2011-03-23  8:23   ` Zhiwei Ying
  2011-03-23 14:43     ` William Cohen
  0 siblings, 1 reply; 4+ messages in thread
From: Zhiwei Ying @ 2011-03-23  8:23 UTC (permalink / raw)
  To: Adrien Kunysz; +Cc: systemtap

I see. What I am looking for is to exclude those bad-function
automatically. I can write a script to test the function one by one,
but it's ugly.

Can stap provides some hint about the probability, which could be used
to estimate the correctness of instrumentation?

Can stap exclude those inlined function with some option?


On Wed, Mar 23, 2011 at 3:49 PM, Adrien Kunysz <adrien@kunysz.be> wrote:
> On Wed, Mar 23, 2011 at 09:22:12AM +0800, Zhiwei Ying wrote:
>> I tried to trace down every function in a device driver, but it fails.
>> It may be cased too many instrumentation. But the problem is how can I
>> know which function is instrumentable and which is not? Or I have to
>> manually narrow the problem? Any idea?
>
> This
>
>        $ stap -l 'module("foo").function("*")'
>
> is supposed to give you a list of all the "probeable" functions in
> module "foo".
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAk2Jpf4ACgkQKLX03ZSPZGzLFgCfVPPsMNE0aP41dz4CbR4wvRgv
> dowAn2ZYglF0Y6jnbgHHzbyziYuWLtXM
> =TVHS
> -----END PGP SIGNATURE-----
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: which function is instrumentable?
  2011-03-23  8:23   ` Zhiwei Ying
@ 2011-03-23 14:43     ` William Cohen
  0 siblings, 0 replies; 4+ messages in thread
From: William Cohen @ 2011-03-23 14:43 UTC (permalink / raw)
  To: systemtap

On 03/23/2011 04:23 AM, Zhiwei Ying wrote:
> I see. What I am looking for is to exclude those bad-function
> automatically. I can write a script to test the function one by one,
> but it's ugly.
> 
> Can stap provides some hint about the probability, which could be used
> to estimate the correctness of instrumentation?
> 
> Can stap exclude those inlined function with some option?
> 

The following will exclude the inlined functions:

stap -l 'module("foo").function("*").call'


-Will

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-23 14:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-23  1:22 which function is instrumentable? Zhiwei Ying
2011-03-23  7:49 ` Adrien Kunysz
2011-03-23  8:23   ` Zhiwei Ying
2011-03-23 14:43     ` William Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).