diff options
author | Werner Koch <[email protected]> | 2013-01-07 15:51:24 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2013-01-07 15:51:24 +0000 |
commit | 0baedfd25a4bdc6c8e7aefbd67006b063e2dc33f (patch) | |
tree | a65ed0efab34ac3296b69a54d78bfccd1e7d0968 /g10/gpg.c | |
parent | gpg: Allow searching for user ids in a keybox. (diff) | |
download | gnupg-0baedfd25a4bdc6c8e7aefbd67006b063e2dc33f.tar.gz gnupg-0baedfd25a4bdc6c8e7aefbd67006b063e2dc33f.zip |
New function log_clock.
* common/logging.c (log_clock): New.
* g10/gpg.c (set_debug): Print clock debug flag.
* g10/options.h (DBG_CLOCK_VALUE, DBG_CLOCK): New.
--
To actually use log_clock you need to enable the code in
logginc.c:log_check() and link against librt. --debug 4096 may then
be used to enable it at runtime.
Diffstat (limited to '')
-rw-r--r-- | g10/gpg.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1029,7 +1029,7 @@ set_debug (const char *level) gcry_control (GCRYCTL_SET_VERBOSITY, (int)opt.verbose); if (opt.debug) - log_info ("enabled debug flags:%s%s%s%s%s%s%s%s%s%s%s%s%s\n", + log_info ("enabled debug flags:%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", (opt.debug & DBG_PACKET_VALUE )? " packet":"", (opt.debug & DBG_MPI_VALUE )? " mpi":"", (opt.debug & DBG_CIPHER_VALUE )? " cipher":"", @@ -1042,7 +1042,8 @@ set_debug (const char *level) (opt.debug & DBG_HASHING_VALUE)? " hashing":"", (opt.debug & DBG_EXTPROG_VALUE)? " extprog":"", (opt.debug & DBG_CARD_IO_VALUE)? " cardio":"", - (opt.debug & DBG_ASSUAN_VALUE )? " assuan":""); + (opt.debug & DBG_ASSUAN_VALUE )? " assuan":"", + (opt.debug & DBG_CLOCK_VALUE )? " clock":""); } @@ -3114,6 +3115,8 @@ main (int argc, char **argv) } set_debug (debug_level); + if (DBG_CLOCK) + log_clock ("start"); /* Do these after the switch(), so they can override settings. */ if(PGP2) @@ -4097,6 +4100,8 @@ void g10_exit( int rc ) { gcry_control (GCRYCTL_UPDATE_RANDOM_SEED_FILE); + if (DBG_CLOCK) + log_clock ("stop"); if ( (opt.debug & DBG_MEMSTAT_VALUE) ) { gcry_control (GCRYCTL_DUMP_MEMORY_STATS); |