This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Calling systemtap function from pure code


Daniel Doron <danielmeirdoron@gmail.com> writes:

> Is it possible to call a stap function from [embedded-c code]?

> function log_evnt_stap(name){
>     printf("name %s \n", name )
> }
> [something like ... function foo () %{ log_event_stap("foo") %}

Nope.  For example, the code that systemtap functions are translated to
have a rather different API/ABI at the C level, e.g., involving putting
parameters into an explicit stack structure (context*).  You can
probably hack together something that would work for your script, based
on an examination of stap -p3 output, but is not a well-supported
technique.

- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]