Is it ok to insert a module multiple times with staprun?
Shiyao Ma
i@introo.me
Sat Apr 1 06:15:00 GMT 2017
If the expr in `if expr' could support function invocation, that would
be awesome.
Currently, only
probe kernel.function("vfs_read") if (some_variable) is supported.
probe kernel.function("vfs_read") if (some_func()) is not supported.
Best.
On Fri, Mar 31, 2017 at 11:40 PM, David Smith <dsmith@redhat.com> wrote:
> On Fri, Mar 31, 2017 at 9:50 AM, David Smith <dsmith@redhat.com> wrote:
>> On Thu, Mar 30, 2017 at 10:51 PM, Shiyao Ma <i@introo.me> wrote:
>
> OK, I had another sneaky thought here. You could use the system()
> function to copy the config file to the /proc file. I haven't had time
> to test this, but in theory something like this should work:
>
> ====
> global config_done
>
> probe procfs.write("config")
> {
> # process $value here
> config_done = 1
> }
>
> probe kernel.function("vfs_read") if (config_done)
> {
> # real processing here...
> }
>
> probe begin
> {
> system(sprintf("cat config > /proc/systemtap/%s/config", module_name()))
> }
> ====
>
> --
> David Smith
> dsmith@redhat.com
> Red Hat
> http://www.redhat.com
> 256.217.0141 (direct)
> 256.837.0057 (fax)
More information about the Systemtap
mailing list