It seemed worthwhile to start this thread.
We need some code and development conventions, and you are likely to
get to code first.
I assume we will wrap code changes to the base Erlang distribution is
C '#if define(...) ... #endif'.
We should be able to build without our DTrace support, and get an
equivalent/identical build result to the erlang.org development release.
You choose the conventions, I thought ERLANG_DTRACE or ERL_DTRACE as
a macro name.
It'd be good to have a consistent flag to make too, so that we can
easily make a normal or 'DTrace-enhanced' build.
I assume you'll figure out an approach to the directory structure. I
don't know what your views are.
Please send thoughts to the group for the benefit of 'future
generations' ;-)
Garry
That's nice. Well done for planning so far ahead ;-)
>> It'd be good to have a consistent flag to make too, so that we can
>> easily make a normal or 'DTrace-enhanced' build.
>
> The above should allow you to make the otp dist with:
>
> ./configure --enable-dtrace
> make
> make install
Cool. If that's all there is to it, then it's done! You're having a
very productive Friday, man.
>> I assume you'll figure out an approach to the directory structure. I
>> don't know what your views are.
>
> I don't think we'll require any new files, just some patches to the
> existing ones, so the only problem with directory structure is
> figuring out the existing structure of the otp distribution.
Really?
Based on an initial 'skim' of the documentation, I can imagine
'fixed' providers like garbage collection events, and scheduling
events might all fit into the existing source, but I had imagined
that there might be a bit of glue needed for other events. I'm not
certain, but, for example, there may be a need for code to do type
conversion to support getting at the Erlang programs functions and
arguments. I imagined that stuff would be nicer in its own directory.
Also, I imagined we'd have some test cases (e.g. Erlang programs,
data and D scripts), and they'd be in a separate directory.
Of course, we don't have to solve everything now.
Garry
DTracing Erang garbage collection seems to be a great use case to
focus details into clarity.
I think this type of stuff, as a return value, could be handled *if*
we can return a D associative array. I don't know how to do this.
Alternatively, we could have a *lot* of probe names, and use lots of
probe descriptions for an action.
Garry