Command line systemtap macro setting

Craig Ringer craig@2ndquadrant.com
Fri Jan 15 02:18:57 GMT 2021


On Wed, 13 Jan 2021 at 23:04, Frank Ch. Eigler <fche@redhat.com> wrote:

> Hi -
>
> > Any thoughts on this? I'd be happy to submit a patch but I'd like to know
> > if you think it's reasonable to do first, so I don't spend the time
> writing
> > something that won't be committable.
> > It'd be a big usability improvement in systemtap for me to be able to
> > define systemtap language macros on the command line.
>
> Thanks so much for doing the Work!  It's certainly a reasonable
> self-serve kind of way to do it outside the tool.
>
> I really think tho that stap translator proper should do this, and am
> pretty sure we can.  It'd be some hacking around within tapsets.cxx or
> loc2stap.cxx or somesuch, but it wouldn't be too much.  The enum
> values for $FOO_BAR could translate straight to literals.  Would you
> have any interest in trying to hack on that?
>

I made an attempt at doing this by implementing an @enum language feature,
but landed up getting totally bogged.

My WIP is attached - it's on top of commit 403e92779 so it might not merge
exactly, but it's unfinished anyway.

I got lost in all the visitors and kept hitting assertions I couldn't
understand or debug, IIRC, and ran out of time on it.

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 2ndQuadrant - PostgreSQL Solutions for the Enterprise
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-wip-enum-support.patch
Type: text/x-patch
Size: 26245 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/systemtap/attachments/20210115/a74bfc11/attachment-0001.bin>


More information about the Systemtap mailing list