profiling XEmacs, esp. on the C level
Jan Rychter
jan at rychter.com
Tue Nov 8 07:57:26 EST 2005
Ben Wing wrote:
> > So far, it seems that everyone's profiling on the Lisp level. But C
> > level profiling could give much better results. Has anyone successfully
> > used Gprof or the VC++ tools for doing C-level profiling? When i tried
> > in the past, i got stuck; things crashed and i couldn't get them to
> > work. Any success stories and instructions telling what exactly to do?
then, three weeks ago I wrote:
> Under Linux you could use oprofile
> (http://oprofile.sourceforge.net/download/). It isn't difficult to use
> and does not require profiler instrumentation when compiling (debugging
> information is useful, though). It also profiles the entire system, so
> it can show you how much time you spend running X11 functions.
Well, Ben had the right idea, so I actually went ahead and did some
profiling. It turned out that the major CPU-eater in modern builds was
mc-alloc and gc.
So, I went ahead and tried to see how I could make it faster.
The summary: relatively minor reworking of mc-alloc.c allows for about a
5% total performance increase as measured by my personal "gnus build
benchmark". Percentages for get_mark_bit, mc_alloc_1, sweep_page were
roughly halved.
Some of my tweaks are specific to 32-bit architectures at the moment,
especially one that replaces an expensive divide with a multiply, two
lookups and a shift.
I'll probably send the patch to Marcus Crestani, as it isn't
production-ready yet, it's closer to a proof-of-concept.
Does anybody have a good GC benchmark that I could use?
--J.
More information about the XEmacs-Beta
mailing list