public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/16726] New: RFE: provide a way to retrieve tapset function types
@ 2014-03-19 20:21 aferrazz at redhat dot com
  2014-03-20 19:55 ` [Bug tapsets/16726] " jistone at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: aferrazz at redhat dot com @ 2014-03-19 20:21 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=16726

            Bug ID: 16726
           Summary: RFE: provide a way to retrieve tapset function types
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: aferrazz at redhat dot com

Running 'stap -vp1' (verbose pass 1, with any provided script) outputs a dump
of all tapset contents; however, tapset functions and their parameters are
printed without their types.

It is possible to infer function & parameter types with pass 2, but that only
examines the functions which are called by a provided script.

I acknowledge that inferring the types of all functions & parameters of all
included tapsets may be processor-intensive, but it may be a useful optional
feature to have available.

For instance, SystemTap IDE for Eclipse (which I contribute to) features a
visual list of all tapset functions & their parameters, with icons next to each
entry to signify return & parameter types. At the moment, the only way to
obtain the types is to directly examine each function's definition in its host
tapset file (if it provides type information at all). In a case such as this,
being able to dump all tapset contents with types inferred would be useful.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug tapsets/16726] RFE: provide a way to retrieve tapset function types
  2014-03-19 20:21 [Bug tapsets/16726] New: RFE: provide a way to retrieve tapset function types aferrazz at redhat dot com
@ 2014-03-20 19:55 ` jistone at redhat dot com
  2014-03-21 18:39 ` jlebon at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jistone at redhat dot com @ 2014-03-20 19:55 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=16726

Josh Stone <jistone at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jistone at redhat dot com

--- Comment #1 from Josh Stone <jistone at redhat dot com> ---
We shouldn't add type resolution to -vp1, but I think we could provide a
specialized option like --dump-functions that reports them all.  This could run
through a few passes of type resolution too, but that still might not resolve
everything.  I expect most types will be inferable by the function body, but
there could be some that depend on how the user calls it.  Leaving those listed
ambiguously is probably correct.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug tapsets/16726] RFE: provide a way to retrieve tapset function types
  2014-03-19 20:21 [Bug tapsets/16726] New: RFE: provide a way to retrieve tapset function types aferrazz at redhat dot com
  2014-03-20 19:55 ` [Bug tapsets/16726] " jistone at redhat dot com
@ 2014-03-21 18:39 ` jlebon at redhat dot com
  2014-04-01 19:53 ` jlebon at redhat dot com
  2014-04-01 19:53 ` jlebon at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: jlebon at redhat dot com @ 2014-03-21 18:39 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=16726

Jonathan Lebon <jlebon at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jlebon at redhat dot com

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug tapsets/16726] RFE: provide a way to retrieve tapset function types
  2014-03-19 20:21 [Bug tapsets/16726] New: RFE: provide a way to retrieve tapset function types aferrazz at redhat dot com
  2014-03-20 19:55 ` [Bug tapsets/16726] " jistone at redhat dot com
  2014-03-21 18:39 ` jlebon at redhat dot com
@ 2014-04-01 19:53 ` jlebon at redhat dot com
  2014-04-01 19:53 ` jlebon at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: jlebon at redhat dot com @ 2014-04-01 19:53 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=16726

Jonathan Lebon <jlebon at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Jonathan Lebon <jlebon at redhat dot com> ---
A related RFE was to add a --dump-probe-aliases switch. This was done in commit
7d66cd7. Sample output:

vfs.read = kernel.function("vfs_read")
vfs.read.return = kernel.function("vfs_read").return
vfs.readv = kernel.function("vfs_readv")
vfs.readv.return = kernel.function("vfs_readv").return
...

Here too, aliases starting with '_' are hidden behind a -v.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug tapsets/16726] RFE: provide a way to retrieve tapset function types
  2014-03-19 20:21 [Bug tapsets/16726] New: RFE: provide a way to retrieve tapset function types aferrazz at redhat dot com
                   ` (2 preceding siblings ...)
  2014-04-01 19:53 ` jlebon at redhat dot com
@ 2014-04-01 19:53 ` jlebon at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: jlebon at redhat dot com @ 2014-04-01 19:53 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=16726

--- Comment #2 from Jonathan Lebon <jlebon at redhat dot com> ---
Commit eb9ea96 added the --dump-functions switch. Sample output:

user_ushort_warn:long (addr:long) /* myproc-unprivileged */
usrdev2kerndev:long (dev:long)
ustack:long (n:long)
usymdata:string (addr:long) /* myproc-unprivileged */
usymname:string (addr:long) /* myproc-unprivileged */
vers_from_clnt:long (clnt:long)
vers_from_prog:long (program:long, vers:long)
vm_fault_contains:long (value:long, test:long)
warn:unknown (msg:string) /* unprivileged */
xid_from_clnt:long (clnt:long)

As Josh mentioned, there is a risk that some types remain unresolved as they
depend on how the user script uses them. For example, if we had the following
tapset function:

function my_func(x) {
   println(x)
}

it would show up in --dump-functions as:

my_func:unknown (x:unknown)

Thankfully, none of the current tapset functions have unresolved argument types
according to the output of --dump-functions.

Note that functions starting with '_' are hidden by default, use -v to show
them.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

end of thread, other threads:[~2014-04-01 19:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-19 20:21 [Bug tapsets/16726] New: RFE: provide a way to retrieve tapset function types aferrazz at redhat dot com
2014-03-20 19:55 ` [Bug tapsets/16726] " jistone at redhat dot com
2014-03-21 18:39 ` jlebon at redhat dot com
2014-04-01 19:53 ` jlebon at redhat dot com
2014-04-01 19:53 ` jlebon at redhat dot com

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