Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

times.c 1.0KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
  3. * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  4. * Copyright (c) 1993-1996 Rick Sladkey <jrs@world.std.com>
  5. * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
  6. * Copyright (c) 2012 H.J. Lu <hongjiu.lu@intel.com>
  7. * Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
  8. * Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
  9. * Copyright (c) 2015-2018 The strace developers.
  10. * All rights reserved.
  11. *
  12. * SPDX-License-Identifier: LGPL-2.1-or-later
  13. */
  14. #include "defs.h"
  15. #include DEF_MPERS_TYPE(tms_t)
  16. #include <sys/times.h>
  17. typedef struct tms tms_t;
  18. #include MPERS_DEFS
  19. SYS_FUNC(times)
  20. {
  21. tms_t tbuf;
  22. if (exiting(tcp) && !umove_or_printaddr(tcp, tcp->u_arg[0], &tbuf)) {
  23. tprintf("{tms_utime=%llu, tms_stime=%llu, ",
  24. zero_extend_signed_to_ull(tbuf.tms_utime),
  25. zero_extend_signed_to_ull(tbuf.tms_stime));
  26. tprintf("tms_cutime=%llu, tms_cstime=%llu}",
  27. zero_extend_signed_to_ull(tbuf.tms_cutime),
  28. zero_extend_signed_to_ull(tbuf.tms_cstime));
  29. }
  30. return 0;
  31. }