From: Abe Jakop <ajakop@redhat.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: Systemtap Upcoming Feature: Address to File:Line Mapping
Date: Fri, 19 Dec 2014 23:19:00 -0000 [thread overview]
Message-ID: <997469081.1170736.1419031176504.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <y0mtx0ru0mq.fsf@fche.csb>
----- Original Message -----
> From: "Frank Ch. Eigler" <fche@redhat.com>
> > [...] As for using this new feature, there are two new tapset
> > functions, usymfileline() and symfileline(). The former requires a
> > user-space address, and a kernel address for the the latter.
>
> Could we also have [u]symfile and/or [u]symline? That way, script
> code wouldn't need to parse [u]symfileline if they only wanted one
> or the other.
Yes. I will add those functions into the tapset library.
> > Since this feature stores line data for runtime access,
> > using this feature may result in large probe modules.
>
> Looking forward to advice as to whether further data
> compression may significantly help.
That's definitely on the list things to do for this feature.
> > [...]
> > linenumbers.stp
> > ===============
> > 1 probe process.statement("*") {
> > 2 printf("addr: %#x, file and line: %s\n",
> > 3 addr(), usymfileline(addr()) )
> > 4 }
>
> (uaddr() in this case.)
Oops. Good catch.
> Glancing at that pf3.stp sample, maybe [u]sym* family of functions
> should more regularly throw catchable errors in case of errors,
> instead of hard-coding a policy of returning a hexified parameter.
> That way the caller can more easily omit the info in its report. So,
>
> before:
>
> try { // modname() can throw
> fn = "k:".modname(addr()).":".symname(addr()).":".symfileline(addr())
> } catch {
> fn = "k:<unknown>:".symname(addr()).":".symfileline(addr())
> }
>
> after:
>
> try { part_1 = "k:".modname(addr()) }
> catch { part_1 = sprintf("k:%p",addr()) }
> try { part_2 = ":".symname(addr()) }
> catch { part_2 = "" }
> try { part_3 = ":".symfileline(addr()) }
> catch { part3 = "" }
> fn = part_1.part_2.part_3
Would this not cause backwards compatibility issues? Or were you thinking
this change would be effective for SystemTap versions >=2.7?
Should I open a PR for this change and another for the feature below?
> Hm, what if we had an expression-context try/catch? (Maybe a
> generalization of ? : ... sort of like @choose_defined()?)
>
> part_1 = "k:" . try_catch(modname(addr()), sprintf("%p",addr()))
> part_2 = try_catch(":".symname(addr()), "")
> part_3 = try_catch(":".symfilename(addr()), "")
> fn = part_1.part_2.part_3
>
> - FChE
Thanks for the feedback,
Abegail
next prev parent reply other threads:[~2014-12-19 23:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <252539308.11641276.1418658500370.JavaMail.zimbra@redhat.com>
2014-12-18 21:52 ` Abe Jakop
2014-12-19 15:21 ` Frank Ch. Eigler
2014-12-19 23:19 ` Abe Jakop [this message]
2014-12-20 12:58 ` Frank Ch. Eigler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=997469081.1170736.1419031176504.JavaMail.zimbra@redhat.com \
--to=ajakop@redhat.com \
--cc=fche@redhat.com \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).