[RFC PATCH v2 0/4] Proposal to add eventfd option to --decode-fds

Sahil Siddiq icegambit91 at gmail.com
Wed May 1 17:27:57 UTC 2024


Hi,

Currently, the --decode-fds option hasn't been implemented for
eventfd file descriptors. Having this option can help examine the
value of the eventfd counter that is associated with an eventfd
file descriptor. This is especially useful when multiple threads
or processes utilise (reading, writing, etc.) file descriptors
corresponding to the same eventfd object.

This proposal also includes a patch to implement this option.

Thanks,
Sahil

Changes v1 -> v2:
- src/filter_qualify.c
  (parse_inject_token): Shift changes from patch #2 to patch #1.
- src/util.c
  (parse_fdinfo_efd_id): New function.
  (printeventfd): Retrieve eventfd-id. Implement "else" branch.
- tests/eventfd-yy.c
  (parse_fdinfo_efd_id): New function.
  (procfs_get_efd_id): Likewise.
  (main): Remove "poll". Test "eventfd-id" retrieval.
- tests/gen_tests.in: Modify rule.

Sahil Siddiq (4):
  Add "base" parameter to string_to_uint_ex
  Add eventfd option to --decode-fds
  Add test for --decode-fds=eventfd
  Document --decode-fds=eventfd implementation

 NEWS                 |   2 +
 doc/strace.1.in      |   5 +-
 src/filter_qualify.c |   5 +-
 src/number_set.h     |   1 +
 src/strace.c         |   7 +--
 src/string_to_uint.c |   4 +-
 src/string_to_uint.h |   4 +-
 src/util.c           |  58 +++++++++++++++++++--
 tests/.gitignore     |   1 +
 tests/Makefile.am    |   1 +
 tests/eventfd-yy.c   | 118 +++++++++++++++++++++++++++++++++++++++++++
 tests/gen_tests.in   |   1 +
 12 files changed, 194 insertions(+), 13 deletions(-)
 create mode 100644 tests/eventfd-yy.c

-- 
2.44.0



More information about the Strace-devel mailing list