1.0.17.13: grab-bag of SB-SPROF enhancements
commit6bce87e4926f16d6dc70a3163a8bbde4303ea61d
authorNikodemus Siivola <nikodemus@random-state.net>
Fri, 30 May 2008 18:26:10 +0000 (30 18:26 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Fri, 30 May 2008 18:26:10 +0000 (30 18:26 +0000)
tree06e28ad4ffff49ee6ffc7bd6ee05cbedff5042cc
parentf439e01e5455f40c24089801dd2147def79f402b
1.0.17.13: grab-bag of SB-SPROF enhancements

 * Added support for wallclock profiling. (Good for noticing waits
   that do not incur run time penalties.)

 * Added keyword arguments :SORT-ORDER (:ASCENDING or :DESCENDING) and
   :SORT-BY (:SAMPLES or :CUMULATIVE-SAMPLES) to REPORT, defaulting to
   :DESCENDING and :SAMPLES as before. Makes eyeballing flat reports
   easier, since often cumulative samples are the ones one should pay
   attention to (esp. for :CPU and :TIME profiling.)

 * Added support for profiling specific threads. New default is to
   profile only the current thread when using WITH-PROFILING, and all
   threads when using START-PROFILING -- :THREADS argument to both
   WITH-PROFILING and START-PROFILING can be used to specify other
   either a specific list of threads to profile, or :ALL to profile
   all threads. (In the future we might want to add eg. :CHILDREN to
   WITH-PROFILING, etc.)

   ** For :CPU profiling the signal handler simply filters out the
      threads we are not profiling.

   ** For :ALLOC profiling, *ALLOC-SIGNAL* is now thread local, and
      the profiler frobs the global *DEFAULT-ALLOC-SIGNAL* and local
      *ALLOC-SIGNAL*s as needed. Before the runtime delivers the
      allocation SIGPROF, it sets *ALLOC-SIGNAL* to T to prevent
      problems with recursive allocation signals (seem better then
      binding it in the handler, since we cannot really bind it quite
      early enough no matter what we do.)

   ** For :TIME profiling, we set up a timer that uses SIGPROF and
      pthread_kill to notify threads.

 * Use system locking macros instead of separate WITHOUT-GCING and
   WITHOUT-INTERRUPTS for cleanliness.

 * Make REPORT report the correct sample/alloction interval, and list
   the threads sampled.
NEWS
contrib/sb-sprof/sb-sprof.lisp
src/code/target-thread.lisp
src/runtime/gencgc.c
src/runtime/thread.c
version.lisp-expr