diff options
author | Petr Machata <pmachata@redhat.com> | 2013-11-21 20:43:51 +0100 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-08-22 20:38:24 +0900 |
commit | 9591aa33a3fe92819a637d5d3dcca30b302b5eb6 (patch) | |
tree | a6b01f4fb943b8567d771a802404753c301ec532 /summary.h | |
parent | 829610cc7f35545c44e8f6ad71ffc1e6730883ad (diff) | |
download | ltrace-9591aa33a3fe92819a637d5d3dcca30b302b5eb6.tar.gz ltrace-9591aa33a3fe92819a637d5d3dcca30b302b5eb6.tar.bz2 ltrace-9591aa33a3fe92819a637d5d3dcca30b302b5eb6.zip |
Consider exec and exit events an end of outstanding calls
- This cleans up a lot of stuff. The actual substance is addition of
account_current_callstack in handle_event.c (which however uses
those cleaned-up interfaces).
- trace-exec.exp was extended to check that the exec syscall can be
seen in -c output. That's one of the symptoms of what this fixes.
- This hides dict_opt_c in summary.c. It also gets rid of the global
variable current_time_spent--instead, the information is passed via
a function argument in a struct timedelta (so that we never confuse
absolute time with relative). callstack_element.time_spent was renamed
to .enter_time, as that is what it has always been.
Diffstat (limited to 'summary.h')
-rw-r--r-- | summary.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/summary.h b/summary.h new file mode 100644 index 0000000..f680ef9 --- /dev/null +++ b/summary.h @@ -0,0 +1,35 @@ +/* + * This file is part of ltrace. + * Copyright (C) 2013 Petr Machata, Red Hat Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#ifndef _SUMMARY_H_ +#define _SUMMARY_H_ + +#include "forward.h" + +struct timedelta { + struct timeval tm; +}; + +struct timedelta calc_time_spent(struct timeval start); +void summary_account_call(struct library_symbol *libsym, + struct timedelta spent); +void show_summary(void); + +#endif /* _SUMMARY_H_ */ |