[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
profiled slapd (from -devel branch)
Sheesh, I never imagined it would be such a pain to get a gprof of a running
slapd, but it's taken me most of today to get glibc to cooperate on this
Linux system.
Here's the top 40-or-so calls after servicing 2 identical searches on a tree
with about 50 nodes. The data is somewhat suspect since there are 30000
mutex_unlocks but only 17000 mutex_locks. The difference in allocs vs frees
is also interesting. Has anyone else done any profile analysis of the slapd
code for debugging or optimization? What platform did you use?
I had to dig thru a bunch of cruft in the glibc 2.0.7 source to get a
complete set of profiled libraries, and only static at that, which also
meant rebuilding my dynamic backends... But hopefully now that I've done it
once it'll be easier from here on out...
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls us/call us/call name
75.00 0.03 0.03 __mcount_internal
25.00 0.04 0.01 713 14.03 14.03 str2charray
0.00 0.04 0.00 41333 0.00 0.00 strcasecmp
0.00 0.04 0.00 30389 0.00 0.00 pthread_mutex_unlock
0.00 0.04 0.00 25762 0.00 0.00 index
0.00 0.04 0.00 17636 0.00 0.00 memmove
0.00 0.04 0.00 17391 0.00 0.00 pthread_mutex_lock
0.00 0.04 0.00 15938 0.00 0.00 attr_index_name_cmp
0.00 0.04 0.00 13117 0.00 0.00 chunk_alloc
0.00 0.04 0.00 12998 0.00 0.00
__libc_internal_tsd_get
0.00 0.04 0.00 12998 0.00 0.00 pthread_mutex_trylock
0.00 0.04 0.00 10255 0.00 0.00 chunk_free
0.00 0.04 0.00 10053 0.00 0.00 cfree
0.00 0.04 0.00 9892 0.00 0.00 ber_memfree
0.00 0.04 0.00 9402 0.00 0.00 malloc
0.00 0.04 0.00 8677 0.00 0.00 ber_memalloc
0.00 0.04 0.00 8484 0.00 0.00 lutil_debug
0.00 0.04 0.00 6663 0.00 0.00 htonl
0.00 0.04 0.00 6572 0.00 0.00 ber_write
0.00 0.04 0.00 6363 0.00 0.00 strlen
0.00 0.04 0.00 6361 0.00 0.00 ber_calc_taglen
0.00 0.04 0.00 5167 0.00 0.00 strncmp
0.00 0.04 0.00 4524 0.00 0.00
_pthread_cleanup_pop_restore
0.00 0.04 0.00 4524 0.00 0.00
_pthread_cleanup_push_defer
0.00 0.04 0.00 4524 0.00 0.00 flockfile
0.00 0.04 0.00 4524 0.00 0.00 funlockfile
0.00 0.04 0.00 4517 0.00 0.00 strcmp
0.00 0.04 0.00 4454 0.00 0.00 ch_free
0.00 0.04 0.00 3907 0.00 0.00 memcpy
0.00 0.04 0.00 3638 0.00 0.00 ber_strdup
0.00 0.04 0.00 3623 0.00 0.00 ch_strdup
0.00 0.04 0.00 3596 0.00 0.00 calloc
0.00 0.04 0.00 3496 0.00 0.00 ber_memcalloc
0.00 0.04 0.00 3293 0.00 0.00 avl_find
0.00 0.04 0.00 3167 0.00 0.00 _IO_default_xsputn
0.00 0.04 0.00 3003 0.00 0.00 charray_inlist
0.00 0.04 0.00 2887 0.00 0.00 ber_printf
0.00 0.04 0.00 2720 0.00 0.00 ch_malloc