public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Custom loader for STAP
@ 2017-05-24 11:14 Arkady
  2017-05-24 17:28 ` Frank Ch. Eigler
  0 siblings, 1 reply; 3+ messages in thread
From: Arkady @ 2017-05-24 11:14 UTC (permalink / raw)
  To: systemtap

Hi,

I am trying to insmod the STAP driver without the staprun. I have
figured out how to do that by writing to the .cmd file - Python script
is here https://github.com/larytet/YALAS/blob/master/generate_messages.py

The approach works fine with the modern (?) kernels. In the CentOS 6.9
folder /sys/kernel/debug/systemtap does not appear after I insmod the
module. Back to the strace and I see this in CentOS 6.9
https://github.com/larytet/YALAS/blob/master/strace.log#L314

I am looking in the staprun source code functions
init_staprun()->insert_stap_module()->insert_module()
I do not see anything special.

After I use staprun once I can insmod manually - the .cmd folder is
getting created. Next boot changes something in the debugfs and I have
to execute staprun again.

There is a "secret" ingredient, but I am missing it.

I will appreciate any tip.

Thanks

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

* Re: Custom loader for STAP
  2017-05-24 11:14 Custom loader for STAP Arkady
@ 2017-05-24 17:28 ` Frank Ch. Eigler
  2017-05-25  6:08   ` Arkady
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2017-05-24 17:28 UTC (permalink / raw)
  To: Arkady; +Cc: systemtap

Arkady <arkady.miasnikov@gmail.com> writes:

> [...]
> The approach works fine with the modern (?) kernels. In the CentOS 6.9
> folder /sys/kernel/debug/systemtap does not appear after I insmod the
> module. [...]

Maybe you're just missing the mount ... DEBUGFS or RELAYFS part from
staprun/staprun_funcs.c: mountfs() ?

- FChE

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

* Re: Custom loader for STAP
  2017-05-24 17:28 ` Frank Ch. Eigler
@ 2017-05-25  6:08   ` Arkady
  0 siblings, 0 replies; 3+ messages in thread
From: Arkady @ 2017-05-25  6:08 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap

Works! Thanks!

Mount point exists, but debugfs is not mounted. This is a 100th time I
forget that debugfs is not necessary mounted after boot. Strace log
clearly shows call to mount(), but I missed this tip as well.
Oh, well. May be next time I will remember.

On Wed, May 24, 2017 at 8:28 PM, Frank Ch. Eigler <fche@redhat.com> wrote:
> Arkady <arkady.miasnikov@gmail.com> writes:
>
>> [...]
>> The approach works fine with the modern (?) kernels. In the CentOS 6.9
>> folder /sys/kernel/debug/systemtap does not appear after I insmod the
>> module. [...]
>
> Maybe you're just missing the mount ... DEBUGFS or RELAYFS part from
> staprun/staprun_funcs.c: mountfs() ?
>
> - FChE

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

end of thread, other threads:[~2017-05-25  6:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-24 11:14 Custom loader for STAP Arkady
2017-05-24 17:28 ` Frank Ch. Eigler
2017-05-25  6:08   ` Arkady

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).