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: Is it ok to insert a module multiple times with staprun?


The easiest is to have a global variable and check it in all probes.
You can set the flag from proc.read

On Fri, Mar 31, 2017 at 6:51 AM, Shiyao Ma <i@introo.me> wrote:
> Hi,
>
>> Really to help you further you are going to have to describe what you
>> are trying to do a bit further.
>
>
> My aim is to pass in some information (arguments) to the module at run
> time (so in pass-5 time, not pass-[1-4]).
> That rules out the first option.  stap -e "foobar".
>
> Also, using the command line of staprun does not work here, due to the
> length limitation on shell command line.
>
> The second procfs option, on the other hand, sounds feasible.
> However, I have a minor concern here.  I'd like the info passed to the
> module (via procfs) be read at the very beginning, *before any
> kernel.function" probe has been registered to the system.
> In other words, any kernel.function probe should only be activated
> after the procfs.read is done.
>
> The closest thing I can come up in my mind is to do something like:
> probe begin {
>   read_the_procfs_file_and_wait()
> }
>
> That is, put the reading file stuff into the begin probe.
>
> Possible to achieve that?
>
>
> Regards.


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