1 Sep 2005 03:03
Re: lots of systemtap language questions
Frank Ch. Eigler <fche <at> redhat.com>
2005-09-01 01:03:29 GMT
2005-09-01 01:03:29 GMT
hunt wrote:
> [...]
> If we are going to have builtin variables, how to do it? For example
> "pid" which would be simply $current->pid (when not in interrupts)? Can
> we make this a variable or do we make it a function, which is easy?
For now, let's skip "builtin variables" as such, and live with
functions that return the values. Even these functions are not
"builtins", but ones just pulled in from the script library. (The
current files named src/tapset/builtin_* may get just renamed at some
point.)
(By the way, "$current" does not exist as such: on 386, it's a macro
that expands to an inline function.)
> Whichever we pick, should the basic builtins have some common prefix?
> Or we just have pid(), caller(), pid(), ppid(), gid(), stack(), etc?
I suggest going for simple names for the obvious ones ("caller" and
"stack" are not quite as obvious as the others).
> For things like printing registers or stack, how should it work?
> I have this working:
>
> probe kernel.function("uptime_read_proc") {
> log("Now in uptime")
> print_regs()
> print_stack()
(Continue reading)
RSS Feed