IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
* count.c (struct call_counts): Add time_min, time_max fields.
(max_ts): New constant.
(enum count_summary_columns): Add CSC_TIME_MIN, CSC_TIME_MAX.
(count_syscall): Fill time_min field with max_ts in counts
initialisation, update time_min and time_max.
(min_time_cmp, max_time_cmp): New functions.
(set_sortby): Add keys for them.
(set_count_summary_columns): Add support for time_min and time_max
fields printing.
* strace.1.in (.SH OPTIONS) <-S, -U>: Document it.
Closes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=240945
Closes: https://github.com/strace/strace/issues/32
For completeness.
* count.c (avg_time_cmp, error_cmp): New functions.
(set_sortby): Add sort keys for the new fields.
* strace.1.in (.SH OPTIONS) <-S>: Document it.
In preparation to extension.
* count.c (enum count_summary_columns): New enumeration type.
(struct call_counts): Add time_avg field.
(DEF_COLUMNS): New macro.
(columns, visible): New variables.
(num_chars): New function.
(call_summary_pers): Calculate aggregate data first, then output table
based on columns configuration.
* tests/count-f.expected: Update expected output.
* tests/strace-C.expected: Likewise.
* tests/strace-S.test: Likewise.
* strace.1.in (.SH DESCRIPTION): add man page section numbber to open,
lstat, getpwuid, id mentions.
(.SH OPTIONS): make strace mentions bold.
(.SH NOTES): It was meant setrlimit(3), not setrlimit(2).
* mmap_cache.h (mmap_cache_rebuild_if_invalid_): rename from
mmap_cache_rebuild_if_invalid.
(mmap_cache_rebuild_if_invalid): New macro, a wrapper for
mmap_cache_rebuild_if_invalid_ that supplies __func__ to it.
(mmap_cache_free_): New declaration.
(mmap_cache_free): New macro, a wrapper for mmap_cache_free_ that
supplies __func__ to it.
* mmap_cache.c (mmap_cache_rebuild_if_invalid_): Rename from
mmap_cache_rebuild_if_invalid.
(mmap_cache_free_): New function.
* unwind-libunwind.c (tcb_walk): Remove __func__ argument from the
mmap_cache_rebuild_if_invalid call.
* kvm.c (vcpu_get_info): Likewise.
* strace.c (droptcb): Call mmap_cache_free.
As of now, when -e raw is set, ERESTART* return code descriptions
are not printed (generic "-1 ERESTART_RESTARTBLOCK (Unknown error 516)"
is printed instead).
* syscall.c (err_desc): New function.
(print_err_ret): Print return code if it is not a ERESTART* error.
(syscall_exiting_trace): Use print_err_ret for normal error return
string printing.
clang complains about it, so it might be a good reason to refactor it
into something more linear.
* syscall.c (syscall_entering_decode): put syscall subcall decoding
before ipc/socket subcall decoding, remove loop.
And provide some alternative names for the sorting options, as some
might be easier to remember than others.
* count.c (set_sortby): Replace nested if's with iteration over a table;
add aliases for the existing sorting options.
* strace.1.in (.SH OPTIONS) <-S>: Document new aliases.
As the source tarball is in xz format already, there is high chance
that xz is already required for the build environment.
* strace.spec.in (BuildRequires): Replace gzip with xz.
(%build): Comparess change logs with xz.
(%files): s/gz/xz.
Before, it relied on implicit assumptions that syscall-exit event is
right the next one after syscall-enter. Also, there's some additional
debugging output that may be might help someone someday.
* count.c (count_syscall): Calculate system time as difference of tcp's
stime and ltime.
* defs.h (struct tcb): Add ltime, atime fields, remove dtime.
* strace.c (droptcb): Print total system time spent by a tcb.
(startup_tcb): Store initial system time in atime.
(next_event): Update stime directly.
* syscall.c (syscall_entering_finish): Store current system time in
tcb's ltime field.
(syscall_exiting_finish): Likewise.
* count.c (time_cmp. syscall_cmp): Change arguments type
to "const void *", Change indices cast type to "unsigned int *".
(count cmp): Likewise. Change count variables type to unsigned int.
(sortfun): Provide types of arguments.
* count.c (zero_ts): New variable.
(count_syscall): Calculate the spent time in the wts variable, then add
it to cc->time.
(call_summary_pers): Do not perform overhead correction.
* count.c (set_overhead): Change argument type to const char *, call
parse_ts to parse it and set to overhead.
* defs.h (set_overhead): Update declaration.
* strace.c: (init) <case 'O'>: do not parse argument, pass optarg to
set_overhead call.
* tests/count.test (GENERIC, WALLCLOCK, HALFCLOCK): New variables with
expected patterns.
Add checks for the new -O syntax.
* delay.c (fill_delay_data): Change intval argument to struct timespec
*val, assign val to ts.
* delay.h (fill_delay_data): Update function declaration.
* filter_qualify.c (parse_delay_token): Parse input with parse_ts,
supply the resulting struct timespec to fill_delay_data.
* tests/delay.c (check_): New function for providing diagnostic in case
of check failure.
(check_delay): Use it.
* tests/delay.test: Check new delay syntax.
* defs.h (sprintflags_ex): Add "sep" argument.
(sprintflags): Pass '\0' in "sep" argument.
* open.c (sprint_open_modes): Use sprintflags_ex for printing
open_mode_flags.
* xlat.c (sprintflags_ex): Add "sep" argument, use it as initial
separator (if not nul).
* defs.h [!MAX_ADDR_LEN] (MAX_ADDR_LEN): New macro.
(sprint_hwaddr): New declaration.
(print_hwaddr): New inline function, a wrapper for sprint_hwaddr.
* print_fields.h (PRINT_FIELD_HWADDR_SZ): New macro.
* print_mac.c: Include "xlat/arp_hardware_types.h" under
XLAT_MACROS_ONLY.
[!MAX_ADDR_LEN] (MAX_ADDR_LEN): Remove.
(sprint_hwaddr): New function.
* sock.c (print_ifreq) <SIOCSIFHWADDR, SIOCGIFHWADDR>: Print hardware
address using PRINT_FIELD_HWADDR_SZ.
get_fd_nl_family did a weird thing: it parsed netlink socket address in
order to get netlink proto, but the address itself is constructed based
on the netlink proto number in the first place. Avoid doing so by
stashing information about netlink protocol right after nul byte of the
sockaddress and providing it on request.
* socketutils.c (cache_entry): Add has_data field.
(cache_inode_details): Add data argument, store it in has_data field.
(get_sockdata_by_inode_cached): New function.
(inet_parse_response, unix_parse_response, packet_parse_response):
Pass false in data argument of cache_inode_details call.
(netlink_parse_response): Append ndiag_protocol value to details string,
pass true to cache_inode_details call.
(unix_get, inet_get, packet_get): Add data argument, return NULL
if called with data == true.
(netlink_get): Add data argument, call get_sockdata_by_inode_cached
instead of get_sockaddr_by_inode_cached if called with data == true.
(protocols): Add data arguments to the type definition of the get field.
(get_sockaddr_by_inode_uncached): Add data argument, pass
it to protocols->get.
(print_sockaddr_by_inode_uncached): Call get_sockaddr_by_inode_uncached
with data == false.
(get_sockaddr_by_inode): Call get_sockaddr_by_inode_uncached with
data == false;
(get_sockdata_by_inode): New function.
* defs.h (get_sockdata_by_inode): New declaration.
* netlink.c (get_fd_nl_family): Use get_sockdata_by_inode.
I don't know why it hasn't been done earlier.
* strace.c [ENABLE_STACKTRACE] (print_stopped): Call unwind_tcb_print
if stack trace printing is enabled.