rust: add support for Intel PT regions (#140) * rust: add `__itt*` functions in generated bindings This change adds some bindgen-generated functions, and not just variables, to the generated bindings. This should resolve #139 by making the `pt_region_*` functions at least visibile in the `ittapi-sys` crate, making it possible to add higher-level Rust versions. We cannot generate bindings for all declared functions because these cause link errors: they are only present in the dynamic library (`*.so`) but not in the static library (`libittnotify.a`) that the `ittapi-sys` crate links to. So, for these dynamically-provided functions we must just retain the `*_ptr__3_0` data symbols and wait for them to be resolved to functions pointers at runtime. * rust: remove unused code * rust: document static/dynamic linking in `README.md` It is easy to forget how the `ittapi` system of static + dynamic linking works (and why!). To answer the underlying question of issues like #139, this change adds some `README.md` documentation explaining why we can't just include all function symbols in the generated bindings. * rust: add `Region` for marking Intel PT regions In #139, @codecnotsupported pointed out a need for access to `__itt_mark_pt_region_begin` and `__itt_mark_pt_region_end` for fine-grained VTune analysis using Intel PT. This change adds a high-level `Region` structure for easy access to these now-available functions. Closes #139.
This ITT/JIT open source profiling API includes:
The Instrumentation and Tracing Technology (ITT) API enables your application to generate and control the collection of trace data during its execution across different Intel tools.
ITT API consists of two parts: a static part and a dynamic part. The dynamic part is specific for a tool and distributed only with a particular tool. The static part is a common part shared between tools. Currently, the static part of ITT API is distributed as a static library and released under a BSD/GPLv2 dual license with every tool supporting ITT API.
To build the library:
PATHPATHpython buildall.py -husage: buildall.py [-h] [-d] [-c] [-v] [-pt] [--force_bits] [-ft] optional arguments: -h, --help show this help message and exit -d, --debug specify debug build configuration (release by default) -c, --clean delete any intermediate and output files -v, --verbose enable verbose output from build process -pt, --ptmark enable anomaly detection support --force_bits specify bit version for the target -ft, --fortran enable fortran support
All code in the repo is dual licensed under GPLv2 and 3-Clause BSD licenses
Please refer to the security policy for reporting vulnerabilties.