[Mono-list] Mono preview 2.0 binary and DTrace
Boris Dušek
boris.dusek at gmail.com
Sun Aug 3 11:32:48 EDT 2008
Hi Andreas,
On Sat, Aug 2, 2008 at 6:30 PM, Andreas Färber <andreas.faerber at web.de> wrote:
>> I grabbed the Mono Preview 2.0 installer for OS X and wanted to test
>> new DTrace probes mentioned in Release Notes[1], but it did not work.
>
> Just to be sure, how did you test? As described in mono's man page?
With the same command that worked with mono that I compiled myself.
(with one difference - I used '/path/to/mono' for customly compiled
mono since my install prefix binary dir was not in $PATH):
boris at Pioneer:~/Documents/dev/mono/usr/bin$ sudo dtrace -P
mono'$target' -l -c mono
ID PROVIDER MODULE FUNCTION NAME
dtrace: failed to match mono3618:::: No probe matches description
boris at Pioneer:~/Documents/dev/mono/usr/bin$ sudo dtrace -P
mono'$target' -l -c ./mono
ID PROVIDER MODULE FUNCTION NAME
20188 mono3620 mono mono_gc_collect gc-begin
20189 mono3620 mono mono_gc_collect gc-end
21858 mono3620 mono mini_method_compile
method-compile-begin
21859 mono3620 mono mini_method_compile
method-compile-end
21860 mono3620 mono mini_init
ves-init-begin
21861 mono3620 mono mini_init
ves-init-end
btw. while we are at it, is it already possible now or do you plan to
add jstack support (so that the names of ".NET functions" appear
instead of addresses of frames for the part inside mono runtime?)
right now, with this Hello World program:
class Test {
public static void Main(string[] args) {
System.Console.WriteLine("Hello from C#");
}
}
and this tracing script (tracing usermode stack at every write syscall):
syscall::write:entry
/pid == $target/
{
trace(arg0);
jstack();
}
I get this output which makes me believe it's either not implemented
or I am doing something wrong (both writes are to fd 1 = stderr):
boris at Pioneer:~/Documents/dev/mono/usr/bin$
DYLD_LIBRARY_PATH=`pwd`/../lib sudo dtrace -s tracemono.d -c './mono
/Users/boris/Test.exe'
dtrace: script 'tracemono.d' matched 1 probe
Hello from C#
dtrace: pid 1528 has exited
CPU ID FUNCTION:NAME
1 17600 write:entry 1
libSystem.B.dylib`write$UNIX2003+0xa
mono`ves_icall_System_IO_MonoIO_Write+0x66
0x7d6084
0x7d5d60
0x7d5bae
0x7d5ae6
0x7cc8cd
0x7d4ed8
0x7d4e6e
0x7d4df8
0x7d4db6
0x7ca289
0x7ca24b
0x7ca1ce
mono`mono_runtime_exec_main+0xfe
mono`mono_runtime_run_main+0x153
mono`mono_main+0x1360
mono`start+0x36
0x2
1 17600 write:entry 1
libSystem.B.dylib`write$UNIX2003+0xa
mono`ves_icall_System_IO_MonoIO_Write+0x66
0x7d6084
0x7d5d60
0x7d5bae
0x7d5ae6
0x7cc8cd
0x7d63bf
0x7d61bd
0x7d614e
0x7d6128
0x7d4e0a
0x7d4db6
0x7ca289
0x7ca24b
0x7ca1ce
mono`mono_runtime_exec_main+0xfe
mono`mono_runtime_run_main+0x153
mono`mono_main+0x1360
mono`start+0x36
0x2
Tracing Java in this way yields empty trace, so probably it's me doing
something stupid.
Thanks,
Boris
More information about the Mono-list
mailing list