[PATCH 3/6] tests: Add period parameter to fill_memory_ex

2016-10-15 Thread Eugene Syromyatnikov
* quotactl.h (fill_memory_ex): Add period parameter, use it as a divisor in non-constant part of value. (fill_memory): Provide period of 0x80 to fill_memory_ex call. * quotactl-xfs.c (main): Likewise. --- tests/quotactl-xfs.c |2 +- tests/quotactl.h |7 --- 2 files changed, 5 i

[PATCH 5/6] xlat: Add values for clockname definitions

2016-10-15 Thread Eugene Syromyatnikov
Since new values have been added gradually over various kernel versions, it's better to define them explicitly in order to avoid situations when strace built with old kernel headers can't decode some recently defined value. * xlat/clocknames.in: Add values for constants. --- xlat/clocknames.in |

[PATCH 2/6] Implement decoding of perf_event_attr structure in perf_event_open syscall

2016-10-15 Thread Eugene Syromyatnikov
* linux/perf_event_struct.h: New file, definition of struct perf_event_attr from Linux 4.8 * 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. *

[PATCH 1/6] defs.h: Add offsetofend macro

2016-10-15 Thread Eugene Syromyatnikov
Analogous to offsetof but returns structure offset after the specified field. Useful for checking whether specific field is present in obtained data or specify amount of data to copy based on the (last) field needed. * defs.h: Add offsetofend macro. --- defs.h |5 + 1 file changed, 5 inse

[PATCH 0/6] Decoding of perf_event_attr structure

2016-10-15 Thread Eugene Syromyatnikov
Hello. The following patch implements decoding of the perf_event_attr structure used in perf_event_open syscall. Eugene Syromyatnikov (6): defs.h: Add offsetofend macro Implement decoding of perf_event_attr structure in perf_event_open syscall tests: Add period parameter to fill_memory_

[PATCH 4/6] tests: Move fill_memory{,_ex} into a separate file

2016-10-15 Thread Eugene Syromyatnikov
* fill_memory.c: New file. * Makefile.am (libtests_a_SOURCES): add fill_memory.c. * quotactl.h (fill_memory, fill_memory_ex): Moved to fill_memory.c. * tests.h: Add declarations of fill_memory, fill_memory_ex. --- tests/Makefile.am |1 + tests/fill_memory.c | 18 ++ tests/q

[PATCH 6/6] tests: Add tests for perf_event_attr structure decoding in perf_event_open

2016-10-15 Thread Eugene Syromyatnikov
* configure.ac: Add checks for presence of various fields of struct perf_event_attr defined in kernel headers. * tests/.gitignore: Add Add perf_event_open_verbose, perf_event_open_verbose_unabbrev.. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add perf_event_open_verbose.test,