- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(Title)
Used Intel VTune™ Profiler, and after sampling there doesn't seem to be any code regions to inspect.
Here the sample code I used to test with.
If it fails to compile, add
".allowlist_function("__itt.*")"
To "ittapi/rust/ittapi-sys/tests/bindgen-up-to-date.rs" the "test_ittnotify_bindings_up_to_date" function and regenerate the bindings as documented in the README.
use std::ffi::CString;
extern crate ittapi_sys;
use ittapi_sys::{__itt_mark_pt_region_begin, __itt_mark_pt_region_end};
pub fn fibonacci_reccursive(n: i32) -> u64 {
if n < 0 {
panic!("{} is negative!", n);
}
match n {
0 => panic!("zero is not a right argument to fibonacci_reccursive()!"),
1 | 2 => 1,
3 => 2,
/*
50 => 12586269025,
*/
_ => fibonacci_reccursive(n - 1) + fibonacci_reccursive(n - 2),
}
}
fn main() {
let region = unsafe { ittapi_sys::__itt_pt_region_create_ptr__3_0.unwrap()(CString::new("test-domain").unwrap().into_raw()) };
unsafe { __itt_mark_pt_region_begin(region) };
fibonacci_reccursive(2);
unsafe { __itt_mark_pt_region_end(region) };
}
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, VTune supports ITT API Rust profiling.
But we currently have an issue with supporting of the __itt_mark_pt_region_begin/end ITT APIs that you mentioned in the sample code (link to the open issue: https://github.com/intel/ittapi/issues/139).
We are working on the problem and it should be resolved in the next release.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page