[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rpctrace output improvements?
From: |
Sergey Bugaev |
Subject: |
Re: rpctrace output improvements? |
Date: |
Sat, 15 May 2021 19:17:42 +0300 |
On Sat, May 15, 2021 at 4:56 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > * rpctrace has to learn to parse defs, instead of (or in addition to) msgids
> > * GNU MIG needs to be taught to emit more info into msgids files
>
> Either of those. Probably the latter would be more interesting
> long-term. We could introduce a new file format that encodes the RPCs
> in a way that is easy to parse for programs, similary to what the msgid
> files, does, but more powerful.
Well, it just so happens that I have some experience in extending MIG
for precisely this purpose.
Darwin uses untyped MIG, so we couldn't just make xtrace iterate over
data items like rpctrace does. Instead I extended Darling MIG to
generate a separate C source file, fooXtraceMig.c, in addition to
fooUser.c and fooServer.c. The file consists of routines that can
parse a message blob back into its arguments; this is then built into
dynamic libraries that are installed into a special directory and
dlopened by xtrace on startup.
But I don't think we want to go all loadable dynamic libraries for
rpctrace; typed MIG makes this much easier to do with just a
declarative format.
Sergey