Commit Graph

5 Commits

Author SHA1 Message Date
Eugene Syromyatnikov
6ed2a84aab Implement decoding of perf_event_attr structure in perf_event_open syscall
* linux/perf_event_struct.h: New file, definition of struct perf_event_attr
from Linux 4.8
* Makefile.am (strace_SOURCES): Add it.
* xlat/hw_breakpoint_len.in: New file.
* xlat/hw_breakpoint_type.in: Likewise.
* xlat/perf_attr_size.in: Likewise.
* xlat/perf_branch_sample_type.in: Likewise.
* xlat/perf_event_read_format.in: Likewise.
* xlat/perf_event_sample_format.in: Likewise.
* xlat/perf_hw_cache_id.in: Likewise.
* xlat/perf_hw_cache_op_id.in: Likewise.
* xlat/perf_hw_cache_op_result_id.in: Likewise.
* xlat/perf_hw_id.in: Likewise.
* xlat/perf_sw_ids.in: Likewise.
* xlat/perf_type_id.in: Likewise.
* perf.c [HAVE_LINUX_PERF_EVENT_H]: Remove inclusion of
<linux/perf_event.h>.
(PRINT_XLAT): New macro for simplifying printing values from
sorted xlat.
(printxlat_search): New function, wrapper for xlat_search with behaviour
similar to printval.
(print_perf_event_attr): New print_event_attr structure fetching and
printing function.
(SYS_FUNC(perf_event_open)): Use print_perf_event_attr for displaying
attr argument contents.
* tests/perf_event_open.c: Renamed to
tests/perf_event_open_nonverbose.c.
* tests/perf_event_open.test: add -e verbose=none in order to preserve
output format being checked (in case verbose output is enabled,
contents of attr arguments are shown now); rename to
tests/perf_event_open_nonverbose.test; add -e trace=perf_event_open.
2016-10-31 04:59:10 +03:00
a95c3e515f Fix printing of invalid flags argument of perf_event_open syscall
* numa.c (SYS_FUNC(perf_event_open)): Print 5th argument of syscall
using printflags_long.
2016-05-16 23:48:05 +00:00
38a34c9349 Add copyright headers to some files which lack them
Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't.  This
change fixes the inconsistency by adding missing copyright headers.

It doesn't mean that copyright headers became maintained.  In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
2015-12-17 17:56:48 +00:00
57823c6836 perf_event_open: mark return code with RVAL_FD flag
* perf.c (sys_perf_event_open): Set RVAL_FD flag in the return code.
2015-08-03 09:09:27 +00:00
0d60cf753e desc.c: move perf_event_open parser to a separate file
* perf.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* desc.c (sys_perf_event_open): Move to perf.c.
2015-08-01 20:46:37 +00:00