On 02/16/10 04:49 PM, Bryan Cantrill wrote:
On Tue, Feb 16, 2010 at 02:12:35PM +0100, Mark Phalan wrote:

I'm working on adding USDT probes to a library. The library is built in
ON and hence includes CTF data. I've set up a number of translators for
the probes to use to avoid exposing the internals of the library.
Unfortunately it appears as though dtrace can't take advantage of the
CTF data in userspace libraries to walk library data structures. The
library data-structures are complex and cannot simply be included in the
provider support file so I have to resort to teaching the library to
setup the arguments for dtrace to consume with an intermediate data
structure. This data strucutre can be then included in the provider
support file (in /usr/lib/dtrace).

I couldn't find a CR/RFE tracking this. Is there one?

No, there is not.  You are welcome to file one, but be aware that this is
not a small amount of work:  to do this properly requires dynamic
translators, an idea that we had somewhat sketched out, but had only
begun to implement when we became distracted by more ambitious projects.
So your best bet for the immediate future is to do exactly what you
(and others) have done:  define an intermediate structure in both your
header file and the .d file that you can easily translate from (in D)
and to (in your library's C code, in an is-enabled probe).  Yes, this
is a bit filthy -- but (1) it's only filthy for provider authors and
(2) dynamic translators are a hell of a lot of work.

Ok, I'll file an RFE. It would be a very cool feature to have. In the meantime I'll continue with what I'm currently using.

Thanks,

-M
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to