[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: the profiling patch
Thanks, I'm CCing cl-mirage in case anyone else has time to try out Mark's amazing new native code profiling support. You should be able to: $ opam remote add shinwell git://github.com/mshinwell/opam-repo-dev and find the new compiler switch he describes below. I'm going to give this a shot over the DNS queryperf benchmarks later. -anil On 26 Feb 2013, at 13:48, Mark Shinwell <mshinwell@xxxxxxxxxxxxxx> wrote: > > 0. Use my 4.00.1-allocation-tracing branch (look in my opam repo > on github for the compiler description). > > 1. Use -allocation-tracing to ocamlopt. > > 2. Run with OCAMLRUNPARAM=T > > 3. Either: > > external decode : unit -> unit > = "caml_dump_allocation_tracing_arrays" > ... > Pervasives.at_exit decode > > or: run under gdb, break on [exit] or similar, then run: > call caml_dump_allocation_tracing_arrays(0) > > 4. Copy and paste the output into two files, one for minor, one for > major, and strip off the first column which says "minor" or "major". > > 5. Run through the decoding script (below). Syntax: > ./decode.sh <executable> <allocation output file> > > Mark > > -- > > #!/bin/bash > > set -eu -o pipefail > > exe="$1" > allocs="$2" > > commands=$(mktemp) > lines=$(mktemp) > nums=$(mktemp) > addrs=$(mktemp) > > cat $allocs | sed 's/,.*//' > $addrs > cat $addrs | sed 's/^/inf line */' > $commands > paste <(sed -e 's/.*,//' $allocs) <(gdb $exe -batch -x $commands) | \ > sed 's/__/./g' | \ > sed 's/<caml\([A-Z]\)/<\1/g' | \ > sed 's/ starts at address /: /' | \ > sed 's/and ends at/->/' | \ > sort -k 1 -n -r >
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |