compile with -DKLPROFILER (and -pg as cc option) normally this is done by "make profiler" add in your config file EXTRA_OBJS = klprofiler.o then, run some code, and in klone say (moncontrol t) to start profiling, then run your code. On exit, two files will be created: gmon.out, the profiling info that should be displayed by gprof gmon.names, a file to give correspondance between C function names of the style "Kl__Func_089" and the klone external name of the function. In fact, exit calls the function (dump-profiling-names) Only a fixed number of functions (1000 by default) can be traced, you can exclude some functions from being profiled by (set-profiling () fonctions...), or force functions to be traced by: (set-profiling t fonctions...). Functions begin to be traced the first time they are called. Format of the gmon.name file: normal function: Kl__Func_090 global-method method call (here method named print on objects of class Point) Kl__Func_092 Point.print a function that has been freed since, but was defined as foo Kl__Func_064 foo OLD a lambda not pointed to by an atom Kl__Func_093 0xe0600 (lambda (s) (length s)) a lambda that has been freed since Kl__Func_071 0xe4740 OLD (lambda (up char) (if up (- char 32) char)) NOTE: profiling makes klone consume more memory. Do not do memory measures on profiled code! EXAMPLE: do: echo '(moncontrol t) (load "SRC/tests/test.kl") (exit)' |klone cat gmon.names gmon-dump: klone script in scripts/ dir, used to format the output of a profiler. for instance, after a run, "gprof klone | gmon-dump" will print a profiler report with klone infos. Should work with all profilers ascii output. (moncontrol t) is automatically done after initialisations and reading profile, but just before entering the main loop, except if you set DONT_START_MONCONTROL=yes (or any non-empty string) in the shell