samples % lib function
4 0.0525 libdovecot.so.0.0.0 sha1_result_libmysqlcli(..)
7 0.0919 libdovecot.so.0.0.0 io_loop_handler_run
36 0.4729 libdovecot.so.0.0.0 imap_parser_reset
227 2.9817 libdovecot.so.0.0.0 pool_alloconly_unref
7339 96.4009 libdovecot.so.0.0.0 pool_alloconly_clear
7710 3.2463 libdovecot.so.0.0.0 safe_memset
7710 100.000 libdovecot.so.0.0.0 safe_memset [self]
-------
1 0.0148 libdovecot.so.0.0.0 i_stream_limit_read
2 0.0296 libdovecot.so.0.0.0 i_stream_header_filt(..)
6 0.0888 libdovecot.so.0.0.0 imap_parser_destroy
8 0.1184 libdovecot.so.0.0.0 settings_parser_deinit
230 3.4039 libdovecot.so.0.0.0 imap_parser_reset
6510 96.3445 libdovecot.so.0.0.0 pool_alloconly_unref
598 0.2518 libdovecot.so.0.0.0 pool_alloconly_clear
7339 89.8286 libdovecot.so.0.0.0 safe_memset
598 7.3195 libdovecot.so.0.0.0 pool_alloconly_clear [self]
232 2.8397 libc-2.3.6.so (no symbols)
1 0.0122 libdovecot.so.0.0.0 body
-------
4 0.0525 libdovecot.so.0.0.0
sha1_result_libmysqlclient_craps_all_over
7 0.0919 libdovecot.so.0.0.0 io_loop_handler_run
36 0.4729 libdovecot.so.0.0.0 imap_parser_reset
227 2.9817 libdovecot.so.0.0.0 pool_alloconly_unref
7339 96.4009 libdovecot.so.0.0.0 pool_alloconly_clear
7710 3.2463 libdovecot.so.0.0.0 safe_memset
7710 100.000 libdovecot.so.0.0.0 safe_memset [self]
Mostly safe_memset is called from pool_alloconly_clear.
I attach result from oprofile - functions (with call tree) that have
more than 2% of all oprofile samples in libdovecot.so.
p_strdup is on the list, but it is lower than before last optimisations.
As You see there is no other optimised functions :)
--
Len7hir
opreport -c -s debug -l -% -g -t 2 libdovecot.so -o libdovecot_profile
CPU: P4 / Xeon with 2 hyper-threads, speed 400 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not stopped)
with a unit mask of 0x01 (mandatory) count 100000
samples % linenr info symbol name
-------------------------------------------------------------------------------
221 0.0617 message-parser.c:322 parse_next_body_to_boundary
264 0.0737 failures.c:487 i_set_failure_prefix
266 0.0742 buffer.c:170 buffer_append
287 0.0801 str.c:122 str_printfa
292 0.0815 message-parser.c:755 message_parser_parse_next_block
368 0.1027 istream.c:105 i_stream_read
369 0.1030 ioloop-epoll.c:164 io_loop_handler_run
375 0.1046 str.c:28 t_str_new
476 0.1328 failures.c:605 i_internal_error_handler
517 0.1443 failures.c:123 default_handler
535 0.1493 failures.c:516 internal_handler
628 0.1752 failures.c:180 default_error_handler
1624 0.4532 ioloop.c:344 io_loop_run
13768 3.8421 (no location information) .plt
13768 3.8421 (no location information) .plt [self]
-------------------------------------------------------------------------------
635 0.1772 str.c:43 str_add_nul
642 0.1792 buffer.c:175 buffer_append_c
27005 7.5360 buffer.c:170 buffer_append
11236 3.1355 buffer.c:162 buffer_write
18214 5.0828 (no location information) (no symbols)
11236 3.1355 buffer.c:162 buffer_write [self]
981 0.2738 buffer.c:24 buffer_alloc
-------------------------------------------------------------------------------
1107 0.3089 array.c:9 array_idx_modifiable_i
1955 0.5456 buffer.c:277 buffer_append_space_unsafe
17315 4.8319 str.c:131 str_vprintfa
7329 2.0452 buffer.c:269 buffer_get_space_unsafe
7329 2.0452 buffer.c:269 buffer_get_space_unsafe [self]
5162 1.4405 buffer.c:24 buffer_alloc
5093 1.4212 mempool.c:6 pool_get_exp_grown_size
3521 0.9826 (no location information) (no symbols)
523 0.1459 lib.c:12 nearest_power
-------------------------------------------------------------------------------
183 0.0511 failures.c:605 i_internal_error_handler
199 0.0555 failures.c:180 default_error_handler
245 0.0684 failures.c:348 syslog_handler
573 0.1599 failures.c:123 default_handler
671 0.1872 failures.c:289 i_debug
721 0.2012 failures.c:516 internal_handler
1069 0.2983 ioloop-epoll.c:164 io_loop_handler_run
2480 0.6921 ioloop.c:337 io_loop_handle_timeouts
8277 2.3098 data-stack.c:109 t_push
8277 2.3098 data-stack.c:109 t_push [self]
-------------------------------------------------------------------------------
225 0.0628 failures.c:123 default_handler
374 0.1044 failures.c:516 internal_handler
402 0.1122 ioloop.c:344 io_loop_run
604 0.1686 ioloop.c:337 io_loop_handle_timeouts
1161 0.3240 ioloop-epoll.c:164 io_loop_handler_run
5139 1.4341 data-stack.c:265 t_pop_check
8345 2.3287 data-stack.c:217 t_pop
8345 2.3287 data-stack.c:217 t_pop [self]
-------------------------------------------------------------------------------
191 0.0533 strfuncs.c:258 t_strconcat
818 0.2283 strfuncs.c:135 p_strdup_vprintf
1651 0.4607 data-stack.c:442 t_buffer_get
3889 1.0853 data-stack.c:395 t_malloc0
7398 2.0645 data-stack.c:306 t_malloc_real
7398 2.0645 data-stack.c:306 t_malloc_real [self]
-------------------------------------------------------------------------------
348 0.0971 hash.c:166 hash_table_lookup_full
12221 3.4104 hash.c:156 hash_table_lookup
10449 2.9159 hash.c:139 hash_table_lookup_node
10449 2.9159 hash.c:139 hash_table_lookup_node [self]
1931 0.5389 ssl-proxy-openssl.c:130 ssl_server_context_cmp
-------------------------------------------------------------------------------
149336 41.6735 ioloop.c:344 io_loop_run
7785 2.1725 ioloop-epoll.c:164 io_loop_handler_run
69467 19.3853 log-connection.c:207 log_connection_input
15803 4.4100 config-connection.c:144 config_connection_input
15545 4.3380 imap-client.c:864 client_input
14879 4.1521 master-service.c:691 master_service_listen
11368 3.1723 ioloop.c:337 io_loop_handle_timeouts
8540 2.3832 ssl-proxy-openssl.c:514 ssl_step
7785 2.1725 ioloop-epoll.c:164 io_loop_handler_run [self]
6694 1.8680 ssl-proxy-openssl.c:279 plain_read
4267 1.1907 client-common.c:571 client_input
-------------------------------------------------------------------------------
135 0.0377 buffer.c:24 buffer_alloc
152 0.0424 settings-parser.c:1665 settings_parser_dup
156 0.0435 settings-parser.c:1293 setting_copy
241 0.0673 buffer.c:115 buffer_create_dynamic
277 0.0773 mempool-alloconly.c:124 pool_alloconly_create
1516 0.4231 hash.c:55 hash_table_create
2331 0.6505 strfuncs.c:32 p_strdup
8327 2.3237 mempool-alloconly.c:270 pool_alloconly_malloc
8327 2.3237 mempool-alloconly.c:270 pool_alloconly_malloc [self]
3284 0.9164 mempool-alloconly.c:230 block_alloc
-------------------------------------------------------------------------------
74736 20.8557 message-parser.c:755 message_parser_parse_next_block
7683 2.1440 message-parser.c:322 parse_next_body_to_boundary
58857 16.4245 (no location information) (no symbols)
7683 2.1440 message-parser.c:322 parse_next_body_to_boundary
[self]
4908 1.3696 message-parser.c:81 parse_body_add_block
2395 0.6683 message-parser.c:206 boundary_line_find
-------------------------------------------------------------------------------
256 0.0714 str.c:131 str_vprintfa
884 0.2467 printf-format-fix.c:67 printf_format_fix
8864 2.4736 printf-format-fix.c:57 printf_format_fix_get_len
10210 2.8492 printf-format-fix.c:36 printf_format_fix_noalloc
10210 2.8492 printf-format-fix.c:36 printf_format_fix_noalloc [self]
-------------------------------------------------------------------------------
327 0.0913 mempool-alloconly.c:216 pool_alloconly_unref
10585 2.9538 mempool-alloconly.c:366 pool_alloconly_clear
11152 3.1121 safe-memset.c:7 safe_memset
11152 3.1121 safe-memset.c:7 safe_memset [self]
-------------------------------------------------------------------------------
536 0.1496 settings-parser.c:1665 settings_parser_dup
692 0.1931 strfuncs.c:386 split_str
799 0.2230 failures.c:487 i_set_failure_prefix
2545 0.7102 strfuncs.c:216 t_strdup
5509 1.5373 settings-parser.c:1293 setting_copy
13525 3.7743 imem.c:18 i_strdup
7193 2.0073 strfuncs.c:32 p_strdup
63196 17.6354 (no location information) (no symbols)
7407 2.0670 mempool-system.c:74 pool_system_malloc
7193 2.0073 strfuncs.c:32 p_strdup [self]
2331 0.6505 mempool-alloconly.c:270 pool_alloconly_malloc
2008 0.5603 mempool-unsafe-datastack.c:57 pool_unsafe_data_stack_malloc
-------------------------------------------------------------------------------
158 0.0441 printf-format-fix.c:57 printf_format_fix_get_len
161 0.0449 str.c:108 str_append_c
165 0.0460 data-stack.c:265 t_pop_check
174 0.0486 buffer.c:175 buffer_append_c
192 0.0536 hash.c:261 hash_table_insert
197 0.0550 failures.c:516 internal_handler
212 0.0592 data-stack.c:395 t_malloc0
230 0.0642 buffer.c:24 buffer_alloc
236 0.0659 buffer.c:115 buffer_create_dynamic
275 0.0767 ioloop-epoll.c:164 io_loop_handler_run
278 0.0776 failures.c:123 default_handler
280 0.0781 strfuncs.c:32 p_strdup
370 0.1033 message-parser.c:322 parse_next_body_to_boundary
392 0.1094 buffer.c:170 buffer_append
496 0.1384 str.c:131 str_vprintfa
10662 2.9753 write-full.c:0 __i686.get_pc_thunk.bx
10662 2.9753 write-full.c:0 __i686.get_pc_thunk.bx [self]
-------------------------------------------------------------------------------