[Mono-dev] [PATCH] Mono DTrace provider v2

Zoltan Varga vargaz at gmail.com
Tue Jun 3 12:32:15 EDT 2008


  Wouldn't be easier to pass the DTRACE and DTRACEFLAGS arguments to the
prelink.sh script in Makefile.am as well, instead of creating it from
an .in file ?
Other than that, I think this is ok to check in. I still don't like
the makefile changes,
but at least they are inside an ifdef, so they won't break anything.


On Sat, May 31, 2008 at 12:09 AM, Andreas Färber <andreas.faerber at web.de> wrote:
> Hello,
> Here's an updated version of my patch, adding initial DTrace support to the
> Mono runtime.
> A new hand-crafted header file has been added, which is to be included in
> place of the generated header file. It defines MONO_PROBE_* macros as
> requested by Zoltan. The generated header file is then only needed iff
> DTrace is enabled.
> Ugly build steps for Solaris were moved to a shell script. It extracts
> object files from their library to a temporary directory, patches them and
> puts them back in. This helps keep Makefiles clean and provides a one-stop
> resource to fix things, should they break. Tested on OpenSolaris 2008.05
> i86. (Warning: I am not experienced in writing shell scripts.)
> It appears the problem with the gc-end probe on Solaris was due to some kind
> of compiler optimization or the like. Adding a trailing sleep(0) call made
> it work; I have limited this workaround to when the gc-end probe is enabled
> on Solaris, to minimize the impact. Better ideas welcome. If we do stick
> with it and it turns out this is needed in more void functions, we could
> consider turning this into a MONO_PROBE_* macro to keep source files clean.
> Signed-off-by: Andreas Faerber <andreas.faerber at web.de>
> Change Log v2:
> * dtrace-prelink.sh.in: New
>  Script to prevent ugly Solaris hacks in Makefiles.
> * configure.in:
>  Prepare support for OSX/x86_64 (untested)
>  Output dtrace-prelink.sh script.
> * data/mono.d: Renamed (from mono-trace.d)
>  Added standard Mono header.
>  Added generation argument to gc-{begin,end} probes.
>  Added explicit stability attributes.
> * mono/utils/dtrace.h: New
>  Wrapper around generated mono/utils/mono-dtrace.h.
>  Define MONO_PROBE_* macros.
> * mono/utils/Makefile.am:
>  We no longer need to postprocess the generated header file.
> * mono/metadata/Makefile.am,
>  mono/mini/Makefile.am:
>  Use new dtrace-prelink.sh script.
> * mono/mini/mini.c,
>  mono/metadata/boehm-gc.c:
>  Use new macros
> * mono/metadata/boehm-gc.c:
>  Add workaround to make gc-end probe work on Solaris.
> Andreas

More information about the Mono-devel-list mailing list