diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 00a5c23..9a76b03 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,11 +21,10 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive - - name: Install prerequisites - if: runner.os == 'Linux' - run: sudo apt-get install gcc-multilib - name: Build C library - run: python buildall.py + # TODO: Ubuntu is phasing out support for 32-bit packages (e.g., `apt install gcc-multilib` + # fails on GitHub's runner); only build the 64-bit version for now. + run: python buildall.py --force_bits 64 rust_format: name: Check Rust formatting diff --git a/rust/ittapi-sys/Cargo.toml b/rust/ittapi-sys/Cargo.toml index ff04983..19deb56 100644 --- a/rust/ittapi-sys/Cargo.toml +++ b/rust/ittapi-sys/Cargo.toml @@ -24,5 +24,5 @@ exclude = [ cc = "1.0.73" [dev-dependencies] -bindgen = "0.59" +bindgen = "0.68" diff = "0.1" diff --git a/rust/ittapi-sys/src/linux/ittnotify_bindings.rs b/rust/ittapi-sys/src/linux/ittnotify_bindings.rs index fc2ed6b..e3270a0 100644 --- a/rust/ittapi-sys/src/linux/ittnotify_bindings.rs +++ b/rust/ittapi-sys/src/linux/ittnotify_bindings.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.59.2 */ +/* automatically generated by rust-bindgen 0.68.1 */ pub const ITT_OS_WIN: u32 = 1; pub const ITT_OS_LINUX: u32 = 2; @@ -24,12 +24,10 @@ pub const __itt_heap_growth: u32 = 2; pub const __itt_section_exec: u32 = 536870912; pub const __itt_section_read: u32 = 1073741824; pub const __itt_section_write: u32 = 2147483648; -pub type size_t = ::std::os::raw::c_ulong; pub const __itt_collection_scope___itt_collection_scope_host: __itt_collection_scope = 1; pub const __itt_collection_scope___itt_collection_scope_offload: __itt_collection_scope = 2; pub const __itt_collection_scope___itt_collection_scope_all: __itt_collection_scope = 2147483647; -#[doc = " @enum __itt_collection_scope"] -#[doc = " @brief Enumerator for collection scopes"] +#[doc = " @enum __itt_collection_scope\n @brief Enumerator for collection scopes"] pub type __itt_collection_scope = ::std::os::raw::c_uint; pub type __itt_pause_ptr__3_0_t = ::std::option::Option; extern "C" { @@ -53,13 +51,7 @@ pub type __itt_detach_ptr__3_0_t = ::std::option::Option extern "C" { pub static mut __itt_detach_ptr__3_0: __itt_detach_ptr__3_0_t; } -#[doc = " @defgroup Intel Processor Trace control"] -#[doc = " API from this group provides control over collection and analysis of Intel Processor Trace (Intel PT) data"] -#[doc = " Information about Intel Processor Trace technology can be found here (Volume 3 chapter 35):"] -#[doc = " https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf"] -#[doc = " Use this API to mark particular code regions for loading detailed performance statistics."] -#[doc = " This mode makes your analysis faster and more accurate."] -#[doc = " @{"] +#[doc = " @defgroup Intel Processor Trace control\n API from this group provides control over collection and analysis of Intel Processor Trace (Intel PT) data\n Information about Intel Processor Trace technology can be found here (Volume 3 chapter 35):\n https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf\n Use this API to mark particular code regions for loading detailed performance statistics.\n This mode makes your analysis faster and more accurate.\n @{"] pub type __itt_pt_region = ::std::os::raw::c_uchar; pub type __itt_pt_region_create_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn(name: *const ::std::os::raw::c_char) -> __itt_pt_region, @@ -87,18 +79,16 @@ extern "C" { } pub const __itt_suppress_mode___itt_unsuppress_range: __itt_suppress_mode = 0; pub const __itt_suppress_mode___itt_suppress_range: __itt_suppress_mode = 1; -#[doc = " @enum __itt_suppress_mode"] -#[doc = " @brief Enumerator for the suppressing modes"] +#[doc = " @enum __itt_suppress_mode\n @brief Enumerator for the suppressing modes"] pub type __itt_suppress_mode = ::std::os::raw::c_uint; -#[doc = " @enum __itt_suppress_mode"] -#[doc = " @brief Enumerator for the suppressing modes"] +#[doc = " @enum __itt_suppress_mode\n @brief Enumerator for the suppressing modes"] pub use self::__itt_suppress_mode as __itt_suppress_mode_t; pub type __itt_suppress_mark_range_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( mode: __itt_suppress_mode_t, mask: ::std::os::raw::c_uint, address: *mut ::std::os::raw::c_void, - size: size_t, + size: usize, ), >; extern "C" { @@ -109,7 +99,7 @@ pub type __itt_suppress_clear_range_ptr__3_0_t = ::std::option::Option< mode: __itt_suppress_mode_t, mask: ::std::os::raw::c_uint, address: *mut ::std::os::raw::c_void, - size: size_t, + size: usize, ), >; extern "C" { @@ -183,8 +173,7 @@ pub type __itt_model_task = *mut ::std::os::raw::c_void; pub type __itt_model_task_instance = *mut ::std::os::raw::c_void; pub const __itt_model_disable___itt_model_disable_observation: __itt_model_disable = 0; pub const __itt_model_disable___itt_model_disable_collection: __itt_model_disable = 1; -#[doc = " @enum __itt_model_disable"] -#[doc = " @brief Enumerator for the disable methods"] +#[doc = " @enum __itt_model_disable\n @brief Enumerator for the disable methods"] pub type __itt_model_disable = ::std::os::raw::c_uint; pub type __itt_model_site_begin_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -202,7 +191,7 @@ extern "C" { pub static mut __itt_model_site_beginA_ptr__3_0: __itt_model_site_beginA_ptr__3_0_t; } pub type __itt_model_site_beginAL_ptr__3_0_t = ::std::option::Option< - unsafe extern "C" fn(name: *const ::std::os::raw::c_char, siteNameLen: size_t), + unsafe extern "C" fn(name: *const ::std::os::raw::c_char, siteNameLen: usize), >; extern "C" { pub static mut __itt_model_site_beginAL_ptr__3_0: __itt_model_site_beginAL_ptr__3_0_t; @@ -233,7 +222,7 @@ extern "C" { pub static mut __itt_model_task_beginA_ptr__3_0: __itt_model_task_beginA_ptr__3_0_t; } pub type __itt_model_task_beginAL_ptr__3_0_t = ::std::option::Option< - unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: size_t), + unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: usize), >; extern "C" { pub static mut __itt_model_task_beginAL_ptr__3_0: __itt_model_task_beginAL_ptr__3_0_t; @@ -244,7 +233,7 @@ extern "C" { pub static mut __itt_model_iteration_taskA_ptr__3_0: __itt_model_iteration_taskA_ptr__3_0_t; } pub type __itt_model_iteration_taskAL_ptr__3_0_t = ::std::option::Option< - unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: size_t), + unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: usize), >; extern "C" { pub static mut __itt_model_iteration_taskAL_ptr__3_0: __itt_model_iteration_taskAL_ptr__3_0_t; @@ -280,7 +269,7 @@ extern "C" { pub static mut __itt_model_lock_release_2_ptr__3_0: __itt_model_lock_release_2_ptr__3_0_t; } pub type __itt_model_record_allocation_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_record_allocation_ptr__3_0: __itt_model_record_allocation_ptr__3_0_t; } @@ -291,17 +280,17 @@ extern "C" { __itt_model_record_deallocation_ptr__3_0_t; } pub type __itt_model_induction_uses_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_induction_uses_ptr__3_0: __itt_model_induction_uses_ptr__3_0_t; } pub type __itt_model_reduction_uses_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_reduction_uses_ptr__3_0: __itt_model_reduction_uses_ptr__3_0_t; } pub type __itt_model_observe_uses_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_observe_uses_ptr__3_0: __itt_model_observe_uses_ptr__3_0_t; } @@ -320,14 +309,11 @@ extern "C" { pub static mut __itt_model_disable_pop_ptr__3_0: __itt_model_disable_pop_ptr__3_0_t; } pub type __itt_model_aggregate_task_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_aggregate_task_ptr__3_0: __itt_model_aggregate_task_ptr__3_0_t; } -#[doc = " @defgroup heap Heap"] -#[doc = " @ingroup public"] -#[doc = " Heap group"] -#[doc = " @{"] +#[doc = " @defgroup heap Heap\n @ingroup public\n Heap group\n @{"] pub type __itt_heap_function = *mut ::std::os::raw::c_void; pub type __itt_heap_function_create_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -339,7 +325,7 @@ extern "C" { pub static mut __itt_heap_function_create_ptr__3_0: __itt_heap_function_create_ptr__3_0_t; } pub type __itt_heap_allocate_begin_ptr__3_0_t = ::std::option::Option< - unsafe extern "C" fn(h: __itt_heap_function, size: size_t, initialized: ::std::os::raw::c_int), + unsafe extern "C" fn(h: __itt_heap_function, size: usize, initialized: ::std::os::raw::c_int), >; extern "C" { pub static mut __itt_heap_allocate_begin_ptr__3_0: __itt_heap_allocate_begin_ptr__3_0_t; @@ -348,7 +334,7 @@ pub type __itt_heap_allocate_end_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( h: __itt_heap_function, addr: *mut *mut ::std::os::raw::c_void, - size: size_t, + size: usize, initialized: ::std::os::raw::c_int, ), >; @@ -371,7 +357,7 @@ pub type __itt_heap_reallocate_begin_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( h: __itt_heap_function, addr: *mut ::std::os::raw::c_void, - new_size: size_t, + new_size: usize, initialized: ::std::os::raw::c_int, ), >; @@ -383,7 +369,7 @@ pub type __itt_heap_reallocate_end_ptr__3_0_t = ::std::option::Option< h: __itt_heap_function, addr: *mut ::std::os::raw::c_void, new_addr: *mut *mut ::std::os::raw::c_void, - new_size: size_t, + new_size: usize, initialized: ::std::os::raw::c_int, ), >; @@ -439,6 +425,8 @@ pub struct ___itt_domain { } #[test] fn bindgen_test_layout____itt_domain() { + const UNINIT: ::std::mem::MaybeUninit<___itt_domain> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_domain>(), 48usize, @@ -450,7 +438,7 @@ fn bindgen_test_layout____itt_domain() { concat!("Alignment of ", stringify!(___itt_domain)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -460,7 +448,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).nameA as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameA) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -470,7 +458,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).nameW as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameW) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -480,7 +468,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -490,7 +478,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -500,7 +488,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -526,6 +514,8 @@ pub struct ___itt_id { } #[test] fn bindgen_test_layout____itt_id() { + const UNINIT: ::std::mem::MaybeUninit<___itt_id> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_id>(), 24usize, @@ -537,7 +527,7 @@ fn bindgen_test_layout____itt_id() { concat!("Alignment of ", stringify!(___itt_id)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_id>())).d1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).d1) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -547,7 +537,7 @@ fn bindgen_test_layout____itt_id() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_id>())).d2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).d2) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -557,7 +547,7 @@ fn bindgen_test_layout____itt_id() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_id>())).d3 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).d3) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -596,6 +586,8 @@ pub struct ___itt_string_handle { } #[test] fn bindgen_test_layout____itt_string_handle() { + const UNINIT: ::std::mem::MaybeUninit<___itt_string_handle> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_string_handle>(), 40usize, @@ -607,7 +599,7 @@ fn bindgen_test_layout____itt_string_handle() { concat!("Alignment of ", stringify!(___itt_string_handle)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).strA as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).strA) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -617,7 +609,7 @@ fn bindgen_test_layout____itt_string_handle() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).strW as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).strW) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -627,7 +619,7 @@ fn bindgen_test_layout____itt_string_handle() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -637,7 +629,7 @@ fn bindgen_test_layout____itt_string_handle() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -647,7 +639,7 @@ fn bindgen_test_layout____itt_string_handle() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -798,8 +790,7 @@ pub const __itt_metadata_type___itt_metadata_s16: __itt_metadata_type = 6; pub const __itt_metadata_type___itt_metadata_float: __itt_metadata_type = 7; #[doc = "< SIgned 64-bit floating-point"] pub const __itt_metadata_type___itt_metadata_double: __itt_metadata_type = 8; -#[doc = " @ingroup parameters"] -#[doc = " @brief describes the type of metadata"] +#[doc = " @ingroup parameters\n @brief describes the type of metadata"] pub type __itt_metadata_type = ::std::os::raw::c_uint; pub type __itt_metadata_add_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -807,7 +798,7 @@ pub type __itt_metadata_add_ptr__3_0_t = ::std::option::Option< id: __itt_id, key: *mut __itt_string_handle, type_: __itt_metadata_type, - count: size_t, + count: usize, data: *mut ::std::os::raw::c_void, ), >; @@ -820,7 +811,7 @@ pub type __itt_metadata_str_add_ptr__3_0_t = ::std::option::Option< id: __itt_id, key: *mut __itt_string_handle, data: *const ::std::os::raw::c_char, - length: size_t, + length: usize, ), >; extern "C" { @@ -832,7 +823,7 @@ pub type __itt_metadata_add_with_scope_ptr__3_0_t = ::std::option::Option< scope: __itt_scope, key: *mut __itt_string_handle, type_: __itt_metadata_type, - count: size_t, + count: usize, data: *mut ::std::os::raw::c_void, ), >; @@ -845,7 +836,7 @@ pub type __itt_metadata_str_add_with_scope_ptr__3_0_t = ::std::option::Option< scope: __itt_scope, key: *mut __itt_string_handle, data: *const ::std::os::raw::c_char, - length: size_t, + length: usize, ), >; extern "C" { @@ -867,13 +858,7 @@ pub const __itt_relation___itt_relation_is_child_of: __itt_relation = 5; pub const __itt_relation___itt_relation_is_continued_by: __itt_relation = 6; #[doc = "< \"A is predecessor to B\" means that B cannot start until A completes (inverse of is_dependent_on)"] pub const __itt_relation___itt_relation_is_predecessor_to: __itt_relation = 7; -#[doc = " @ingroup relations"] -#[doc = " @brief The kind of relation between two instances is specified by the enumerated type __itt_relation."] -#[doc = " Relations between instances can be added with an API call. The relation"] -#[doc = " API uses instance IDs. Relations can be added before or after the actual"] -#[doc = " instances are created and persist independently of the instances. This"] -#[doc = " is the motivation for having different lifetimes for instance IDs and"] -#[doc = " the actual instances."] +#[doc = " @ingroup relations\n @brief The kind of relation between two instances is specified by the enumerated type __itt_relation.\n Relations between instances can be added with an API call. The relation\n API uses instance IDs. Relations can be added before or after the actual\n instances are created and persist independently of the instances. This\n is the motivation for having different lifetimes for instance IDs and\n the actual instances."] pub type __itt_relation = ::std::os::raw::c_uint; pub type __itt_relation_add_to_current_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn(domain: *const __itt_domain, relation: __itt_relation, tail: __itt_id), @@ -902,6 +887,8 @@ pub struct ___itt_clock_info { } #[test] fn bindgen_test_layout____itt_clock_info() { + const UNINIT: ::std::mem::MaybeUninit<___itt_clock_info> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_clock_info>(), 16usize, @@ -913,7 +900,7 @@ fn bindgen_test_layout____itt_clock_info() { concat!("Alignment of ", stringify!(___itt_clock_info)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_info>())).clock_freq as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clock_freq) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -923,7 +910,7 @@ fn bindgen_test_layout____itt_clock_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_info>())).clock_base as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clock_base) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -955,6 +942,8 @@ pub struct ___itt_clock_domain { } #[test] fn bindgen_test_layout____itt_clock_domain() { + const UNINIT: ::std::mem::MaybeUninit<___itt_clock_domain> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_clock_domain>(), 56usize, @@ -966,7 +955,7 @@ fn bindgen_test_layout____itt_clock_domain() { concat!("Alignment of ", stringify!(___itt_clock_domain)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).info as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).info) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -976,7 +965,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).fn_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -986,7 +975,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).fn_data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fn_data) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -996,7 +985,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1006,7 +995,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1016,7 +1005,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -1103,7 +1092,7 @@ extern "C" { pub struct ___itt_counter { _unused: [u8; 0], } -#[doc = " @brief opaque structure for counter identification"] +#[doc = " @brief opaque structure for counter identification\n/\n/** @cond exclude_from_documentation"] pub type __itt_counter = *mut ___itt_counter; pub type __itt_counter_create_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -1261,6 +1250,8 @@ pub struct ___itt_track_group { } #[test] fn bindgen_test_layout____itt_track_group() { + const UNINIT: ::std::mem::MaybeUninit<___itt_track_group> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_track_group>(), 40usize, @@ -1272,7 +1263,7 @@ fn bindgen_test_layout____itt_track_group() { concat!("Alignment of ", stringify!(___itt_track_group)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1282,7 +1273,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).track as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).track) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1292,7 +1283,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).tgtype as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tgtype) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1302,7 +1293,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -1312,7 +1303,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1322,7 +1313,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1334,11 +1325,9 @@ fn bindgen_test_layout____itt_track_group() { } pub type __itt_track_group = ___itt_track_group; pub const ___itt_track_type___itt_track_type_normal: ___itt_track_type = 0; -#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track"] -#[doc = " is the only available track type."] +#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track\n is the only available track type."] pub type ___itt_track_type = ::std::os::raw::c_uint; -#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track"] -#[doc = " is the only available track type."] +#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track\n is the only available track type."] pub use self::___itt_track_type as __itt_track_type; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1357,6 +1346,8 @@ pub struct ___itt_track { } #[test] fn bindgen_test_layout____itt_track() { + const UNINIT: ::std::mem::MaybeUninit<___itt_track> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_track>(), 40usize, @@ -1368,7 +1359,7 @@ fn bindgen_test_layout____itt_track() { concat!("Alignment of ", stringify!(___itt_track)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1378,7 +1369,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).group as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1388,7 +1379,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).ttype as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ttype) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1398,7 +1389,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -1408,7 +1399,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1418,7 +1409,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1453,11 +1444,7 @@ pub type __itt_set_track_ptr__3_0_t = extern "C" { pub static mut __itt_set_track_ptr__3_0: __itt_set_track_ptr__3_0_t; } -#[doc = " @cond exclude_from_gpa_documentation */"] -#[doc = " @defgroup events Events"] -#[doc = " @ingroup public"] -#[doc = " Events group"] -#[doc = " @{"] +#[doc = " @cond exclude_from_gpa_documentation */\n/**\n @defgroup events Events\n @ingroup public\n Events group\n @{\n/\n/** @brief user event type"] pub type __itt_event = ::std::os::raw::c_int; pub type __itt_event_create_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -1528,18 +1515,19 @@ pub struct ___itt_section_info { pub name: *const ::std::os::raw::c_char, #[doc = "< Section content and semantics description"] pub type_: __itt_section_type, - #[doc = "< Section bit flags that describe attributes using bit mask"] - #[doc = " Zero if disabled, non-zero if enabled"] - pub flags: size_t, + #[doc = "< Section bit flags that describe attributes using bit mask\n Zero if disabled, non-zero if enabled"] + pub flags: usize, #[doc = "< Section load(relocated) start address"] pub start_addr: *mut ::std::os::raw::c_void, #[doc = "< Section file offset"] - pub size: size_t, + pub size: usize, #[doc = "< Section size"] - pub file_offset: size_t, + pub file_offset: usize, } #[test] fn bindgen_test_layout____itt_section_info() { + const UNINIT: ::std::mem::MaybeUninit<___itt_section_info> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_section_info>(), 48usize, @@ -1551,7 +1539,7 @@ fn bindgen_test_layout____itt_section_info() { concat!("Alignment of ", stringify!(___itt_section_info)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1561,7 +1549,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1571,7 +1559,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1581,7 +1569,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).start_addr as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).start_addr) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1591,7 +1579,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1601,7 +1589,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).file_offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).file_offset) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1621,24 +1609,20 @@ pub struct ___itt_module_object { pub module_id: __itt_id, #[doc = "< Binary module format"] pub module_type: __itt_module_type, - #[doc = "< Unique module name or path to module in UTF8"] - #[doc = " Contains module name when module_bufer and module_size exist"] - #[doc = " Contains module path when module_bufer and module_size absent"] - #[doc = " module_name remains the same for the certain module_id"] + #[doc = "< Unique module name or path to module in UTF8\n Contains module name when module_bufer and module_size exist\n Contains module path when module_bufer and module_size absent\n module_name remains the same for the certain module_id"] pub module_name: *const ::std::os::raw::c_char, #[doc = "< Module buffer content"] pub module_buffer: *mut ::std::os::raw::c_void, - #[doc = "< Module buffer size */"] - #[doc = " If module_buffer and module_size do not exist,"] - #[doc = " the binary module exists on the system already."] - #[doc = " The module_name parameter contains the path to the module."] - pub module_size: size_t, + #[doc = "< Module buffer size */\n/*!< If module_buffer and module_size exist, the binary module is dumped onto the system.\n If module_buffer and module_size do not exist,\n the binary module exists on the system already.\n The module_name parameter contains the path to the module."] + pub module_size: usize, #[doc = "< Reference to section information"] pub section_array: *mut __itt_section_info, - pub section_number: size_t, + pub section_number: usize, } #[test] fn bindgen_test_layout____itt_module_object() { + const UNINIT: ::std::mem::MaybeUninit<___itt_module_object> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_module_object>(), 80usize, @@ -1650,7 +1634,7 @@ fn bindgen_test_layout____itt_module_object() { concat!("Alignment of ", stringify!(___itt_module_object)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_module_object>())).version as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1660,7 +1644,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_module_object>())).module_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).module_id) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1670,9 +1654,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).module_type as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_type) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1682,9 +1664,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).module_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_name) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1694,9 +1674,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).module_buffer as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_buffer) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -1706,9 +1684,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).module_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_size) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -1718,9 +1694,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).section_array as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).section_array) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -1730,9 +1704,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).section_number as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).section_number) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -1775,6 +1747,8 @@ pub struct ___itt_histogram { } #[test] fn bindgen_test_layout____itt_histogram() { + const UNINIT: ::std::mem::MaybeUninit<___itt_histogram> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_histogram>(), 56usize, @@ -1786,7 +1760,7 @@ fn bindgen_test_layout____itt_histogram() { concat!("Alignment of ", stringify!(___itt_histogram)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).domain as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).domain) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1796,7 +1770,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).nameA as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameA) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1806,7 +1780,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).nameW as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameW) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1816,7 +1790,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).x_type as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).x_type) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1826,7 +1800,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).y_type as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).y_type) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -1836,7 +1810,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1846,7 +1820,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1856,7 +1830,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -1881,7 +1855,7 @@ extern "C" { pub type __itt_histogram_submit_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( hist: *mut __itt_histogram, - length: size_t, + length: usize, x_data: *mut ::std::os::raw::c_void, y_data: *mut ::std::os::raw::c_void, ), @@ -1953,6 +1927,9 @@ pub struct ___itt_context_metadata { } #[test] fn bindgen_test_layout____itt_context_metadata() { + const UNINIT: ::std::mem::MaybeUninit<___itt_context_metadata> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_context_metadata>(), 16usize, @@ -1964,7 +1941,7 @@ fn bindgen_test_layout____itt_context_metadata() { concat!("Alignment of ", stringify!(___itt_context_metadata)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_context_metadata>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1974,7 +1951,7 @@ fn bindgen_test_layout____itt_context_metadata() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_context_metadata>())).value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1988,7 +1965,7 @@ pub type __itt_context_metadata = ___itt_context_metadata; pub type __itt_bind_context_metadata_to_counter_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( counter: __itt_counter, - length: size_t, + length: usize, metadata: *mut __itt_context_metadata, ), >; diff --git a/rust/ittapi-sys/src/linux/jitprofiling_bindings.rs b/rust/ittapi-sys/src/linux/jitprofiling_bindings.rs index 8654fc5..428296c 100644 --- a/rust/ittapi-sys/src/linux/jitprofiling_bindings.rs +++ b/rust/ittapi-sys/src/linux/jitprofiling_bindings.rs @@ -1,91 +1,34 @@ -/* automatically generated by rust-bindgen 0.59.2 */ +/* automatically generated by rust-bindgen 0.68.1 */ -#[doc = "<\\brief Send this to shutdown the agent."] -#[doc = " Use NULL for event data."] +#[doc = "<\\brief Send this to shutdown the agent.\n Use NULL for event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_SHUTDOWN: iJIT_jvm_event = 2; -#[doc = "<\\brief Send when dynamic code is"] -#[doc = " JIT compiled and loaded into"] -#[doc = " memory by the JIT engine, but"] -#[doc = " before the code is executed."] -#[doc = " Use iJIT_Method_Load as event"] -#[doc = " data."] +#[doc = "<\\brief Send when dynamic code is\n JIT compiled and loaded into\n memory by the JIT engine, but\n before the code is executed.\n Use iJIT_Method_Load as event\n data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED: iJIT_jvm_event = 13; -#[doc = "<\\brief Send when compiled dynamic"] -#[doc = " code is being unloaded from memory."] -#[doc = " Use iJIT_Method_Load as event data."] +#[doc = "<\\brief Send when compiled dynamic\n code is being unloaded from memory.\n Use iJIT_Method_Load as event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UNLOAD_START: iJIT_jvm_event = 14; -#[doc = "<\\brief Send to provide new content for"] -#[doc = " a previously reported dynamic code."] -#[doc = " The previous content will be invalidated"] -#[doc = " starting from the time of the notification."] -#[doc = " Use iJIT_Method_Load as event data but"] -#[doc = " required fields are following:"] -#[doc = " - method_id identify the code to update."] -#[doc = " - method_load_address specify start address"] -#[doc = " within identified code range"] -#[doc = " where update should be started."] -#[doc = " - method_size specify length of updated code"] -#[doc = " range."] +#[doc = "<\\brief Send to provide new content for\n a previously reported dynamic code.\n The previous content will be invalidated\n starting from the time of the notification.\n Use iJIT_Method_Load as event data but\n required fields are following:\n - method_id identify the code to update.\n - method_load_address specify start address\n within identified code range\n where update should be started.\n - method_size specify length of updated code\n range."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UPDATE: iJIT_jvm_event = 15; -#[doc = "<\\brief Send when an inline dynamic"] -#[doc = " code is JIT compiled and loaded"] -#[doc = " into memory by the JIT engine,"] -#[doc = " but before the parent code region"] -#[doc = " starts executing."] -#[doc = " Use iJIT_Method_Inline_Load as event data."] +#[doc = "<\\brief Send when an inline dynamic\n code is JIT compiled and loaded\n into memory by the JIT engine,\n but before the parent code region\n starts executing.\n Use iJIT_Method_Inline_Load as event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED: iJIT_jvm_event = 16; #[doc = " @cond exclude_from_documentation"] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UPDATE_V2: iJIT_jvm_event = 17; -#[doc = "<\\brief Send when a dynamic code is"] -#[doc = " JIT compiled and loaded into"] -#[doc = " memory by the JIT engine, but"] -#[doc = " before the code is executed."] -#[doc = " Use iJIT_Method_Load_V2 as event data."] +#[doc = "<\\brief Send when a dynamic code is\n JIT compiled and loaded into\n memory by the JIT engine, but\n before the code is executed.\n Use iJIT_Method_Load_V2 as event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2: iJIT_jvm_event = 21; -#[doc = "<\\brief Send when a dynamic code is"] -#[doc = " JIT compiled and loaded into"] -#[doc = " memory by the JIT engine, but"] -#[doc = " before the code is executed."] -#[doc = " Use iJIT_Method_Load_V3 as event data."] +#[doc = "<\\brief Send when a dynamic code is\n JIT compiled and loaded into\n memory by the JIT engine, but\n before the code is executed.\n Use iJIT_Method_Load_V3 as event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3: iJIT_jvm_event = 22; #[doc = " @brief Enumerator for the types of notifications"] pub type iJIT_jvm_event = ::std::os::raw::c_uint; #[doc = " @brief Enumerator for the types of notifications"] pub use self::iJIT_jvm_event as iJIT_JVM_EVENT; -#[doc = "<\\brief The agent is not running;"] -#[doc = " iJIT_NotifyEvent calls will"] -#[doc = " not be processed."] +#[doc = "<\\brief The agent is not running;\n iJIT_NotifyEvent calls will\n not be processed."] pub const _iJIT_IsProfilingActiveFlags_iJIT_NOTHING_RUNNING: _iJIT_IsProfilingActiveFlags = 0; -#[doc = "<\\brief The agent is running and"] -#[doc = " ready to process notifications."] +#[doc = "<\\brief The agent is running and\n ready to process notifications."] pub const _iJIT_IsProfilingActiveFlags_iJIT_SAMPLING_ON: _iJIT_IsProfilingActiveFlags = 1; #[doc = " @brief Enumerator for the agent's mode"] pub type _iJIT_IsProfilingActiveFlags = ::std::os::raw::c_uint; #[doc = " @brief Enumerator for the agent's mode"] pub use self::_iJIT_IsProfilingActiveFlags as iJIT_IsProfilingActiveFlags; -#[doc = " @brief Description of a single entry in the line number information of a code region."] -#[doc = " @details A table of line number entries gives information about how the reported code region"] -#[doc = " is mapped to source file."] -#[doc = " Intel(R) VTune(TM) Amplifier uses line number information to attribute"] -#[doc = " the samples (virtual address) to a line number. \\n"] -#[doc = " It is acceptable to report different code addresses for the same source line:"] -#[doc = " @code"] -#[doc = " Offset LineNumber"] -#[doc = " 1 2"] -#[doc = " 12 4"] -#[doc = " 15 2"] -#[doc = " 18 1"] -#[doc = " 21 30"] -#[doc = ""] -#[doc = " VTune Amplifier constructs the following table using the client data"] -#[doc = ""] -#[doc = " Code subrange Line number"] -#[doc = " 0-1 2"] -#[doc = " 1-12 4"] -#[doc = " 12-15 2"] -#[doc = " 15-18 1"] -#[doc = " 18-21 30"] -#[doc = " @endcode"] +#[doc = " @brief Description of a single entry in the line number information of a code region.\n @details A table of line number entries gives information about how the reported code region\n is mapped to source file.\n Intel(R) VTune(TM) Amplifier uses line number information to attribute\n the samples (virtual address) to a line number. \\n\n It is acceptable to report different code addresses for the same source line:\n @code\n Offset LineNumber\n 1 2\n 12 4\n 15 2\n 18 1\n 21 30\n\n VTune Amplifier constructs the following table using the client data\n\n Code subrange Line number\n 0-1 2\n 1-12 4\n 12-15 2\n 15-18 1\n 18-21 30\n @endcode"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _LineNumberInfo { @@ -96,6 +39,8 @@ pub struct _LineNumberInfo { } #[test] fn bindgen_test_layout__LineNumberInfo() { + const UNINIT: ::std::mem::MaybeUninit<_LineNumberInfo> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_LineNumberInfo>(), 8usize, @@ -107,7 +52,7 @@ fn bindgen_test_layout__LineNumberInfo() { concat!("Alignment of ", stringify!(_LineNumberInfo)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_LineNumberInfo>())).Offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -117,7 +62,7 @@ fn bindgen_test_layout__LineNumberInfo() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_LineNumberInfo>())).LineNumber as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).LineNumber) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -127,53 +72,9 @@ fn bindgen_test_layout__LineNumberInfo() { ) ); } -#[doc = " @brief Description of a single entry in the line number information of a code region."] -#[doc = " @details A table of line number entries gives information about how the reported code region"] -#[doc = " is mapped to source file."] -#[doc = " Intel(R) VTune(TM) Amplifier uses line number information to attribute"] -#[doc = " the samples (virtual address) to a line number. \\n"] -#[doc = " It is acceptable to report different code addresses for the same source line:"] -#[doc = " @code"] -#[doc = " Offset LineNumber"] -#[doc = " 1 2"] -#[doc = " 12 4"] -#[doc = " 15 2"] -#[doc = " 18 1"] -#[doc = " 21 30"] -#[doc = ""] -#[doc = " VTune Amplifier constructs the following table using the client data"] -#[doc = ""] -#[doc = " Code subrange Line number"] -#[doc = " 0-1 2"] -#[doc = " 1-12 4"] -#[doc = " 12-15 2"] -#[doc = " 15-18 1"] -#[doc = " 18-21 30"] -#[doc = " @endcode"] +#[doc = " @brief Description of a single entry in the line number information of a code region.\n @details A table of line number entries gives information about how the reported code region\n is mapped to source file.\n Intel(R) VTune(TM) Amplifier uses line number information to attribute\n the samples (virtual address) to a line number. \\n\n It is acceptable to report different code addresses for the same source line:\n @code\n Offset LineNumber\n 1 2\n 12 4\n 15 2\n 18 1\n 21 30\n\n VTune Amplifier constructs the following table using the client data\n\n Code subrange Line number\n 0-1 2\n 1-12 4\n 12-15 2\n 15-18 1\n 18-21 30\n @endcode"] pub type pLineNumberInfo = *mut _LineNumberInfo; -#[doc = " @brief Description of a single entry in the line number information of a code region."] -#[doc = " @details A table of line number entries gives information about how the reported code region"] -#[doc = " is mapped to source file."] -#[doc = " Intel(R) VTune(TM) Amplifier uses line number information to attribute"] -#[doc = " the samples (virtual address) to a line number. \\n"] -#[doc = " It is acceptable to report different code addresses for the same source line:"] -#[doc = " @code"] -#[doc = " Offset LineNumber"] -#[doc = " 1 2"] -#[doc = " 12 4"] -#[doc = " 15 2"] -#[doc = " 18 1"] -#[doc = " 21 30"] -#[doc = ""] -#[doc = " VTune Amplifier constructs the following table using the client data"] -#[doc = ""] -#[doc = " Code subrange Line number"] -#[doc = " 0-1 2"] -#[doc = " 1-12 4"] -#[doc = " 12-15 2"] -#[doc = " 15-18 1"] -#[doc = " 18-21 30"] -#[doc = " @endcode"] +#[doc = " @brief Description of a single entry in the line number information of a code region.\n @details A table of line number entries gives information about how the reported code region\n is mapped to source file.\n Intel(R) VTune(TM) Amplifier uses line number information to attribute\n the samples (virtual address) to a line number. \\n\n It is acceptable to report different code addresses for the same source line:\n @code\n Offset LineNumber\n 1 2\n 12 4\n 15 2\n 18 1\n 21 30\n\n VTune Amplifier constructs the following table using the client data\n\n Code subrange Line number\n 0-1 2\n 1-12 4\n 12-15 2\n 15-18 1\n 18-21 30\n @endcode"] pub type LineNumberInfo = _LineNumberInfo; #[doc = "<\\brief Native to the process architecture that is calling it."] pub const _iJIT_CodeArchitecture_iJIT_CA_NATIVE: _iJIT_CodeArchitecture = 0; @@ -185,43 +86,21 @@ pub const _iJIT_CodeArchitecture_iJIT_CA_64: _iJIT_CodeArchitecture = 2; pub type _iJIT_CodeArchitecture = ::std::os::raw::c_uint; #[doc = " @brief Enumerator for the code architecture."] pub use self::_iJIT_CodeArchitecture as iJIT_CodeArchitecture; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED\n as an event type to report it."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Load { - #[doc = "<\\brief Unique method ID. Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or else manage ID uniqueness"] - #[doc = " and correct range by yourself.\\n"] - #[doc = " You must use the same method ID for all code"] - #[doc = " regions of the same method, otherwise different"] - #[doc = " method IDs specify different methods."] + #[doc = "<\\brief Unique method ID. Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or else manage ID uniqueness\n and correct range by yourself.\\n\n You must use the same method ID for all code\n regions of the same method, otherwise different\n method IDs specify different methods."] pub method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief The name of the method. It can be optionally"] - #[doc = " prefixed with its class name and appended with"] - #[doc = " its complete signature. Can't be NULL."] + #[doc = "<\\brief The name of the method. It can be optionally\n prefixed with its class name and appended with\n its complete signature. Can't be NULL."] pub method_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief The start virtual address of the method code"] - #[doc = " region. If NULL, data provided with"] - #[doc = " event are not accepted."] + #[doc = "<\\brief The start virtual address of the method code\n region. If NULL, data provided with\n event are not accepted."] pub method_load_address: *mut ::std::os::raw::c_void, - #[doc = "<\\brief The code size of the method in memory."] - #[doc = " If 0, then data provided with the event are not"] - #[doc = " accepted."] + #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."] pub method_size: ::std::os::raw::c_uint, - #[doc = "<\\brief The number of entries in the line number"] - #[doc = " table.0 if none."] + #[doc = "<\\brief The number of entries in the line number\n table.0 if none."] pub line_number_size: ::std::os::raw::c_uint, - #[doc = "<\\brief Pointer to the line numbers info"] - #[doc = " array. Can be NULL if"] - #[doc = " line_number_size is 0. See"] - #[doc = " LineNumberInfo Structure for a"] - #[doc = " description of a single entry in"] - #[doc = " the line number info array"] + #[doc = "<\\brief Pointer to the line numbers info\n array. Can be NULL if\n line_number_size is 0. See\n LineNumberInfo Structure for a\n description of a single entry in\n the line number info array"] pub line_number_table: pLineNumberInfo, #[doc = "<\\brief This field is obsolete."] pub class_id: ::std::os::raw::c_uint, @@ -232,6 +111,8 @@ pub struct _iJIT_Method_Load { } #[test] fn bindgen_test_layout__iJIT_Method_Load() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Load> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Load>(), 64usize, @@ -243,7 +124,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { concat!("Alignment of ", stringify!(_iJIT_Method_Load)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -253,7 +134,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -263,9 +144,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_load_address as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -275,7 +154,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -285,9 +164,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).line_number_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -297,9 +174,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).line_number_table as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -309,7 +184,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).class_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).class_id) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -319,9 +194,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).class_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -331,9 +204,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).source_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -343,66 +214,37 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); } -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED\n as an event type to report it."] pub type piJIT_Method_Load = *mut _iJIT_Method_Load; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED\n as an event type to report it."] pub type iJIT_Method_Load = _iJIT_Method_Load; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load_V2 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load_V2 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2\n as an event type to report it."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Load_V2 { - #[doc = "<\\brief Unique method ID. Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or else manage ID uniqueness"] - #[doc = " and correct range by yourself.\\n"] - #[doc = " You must use the same method ID for all code"] - #[doc = " regions of the same method, otherwise different"] - #[doc = " method IDs specify different methods."] + #[doc = "<\\brief Unique method ID. Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or else manage ID uniqueness\n and correct range by yourself.\\n\n You must use the same method ID for all code\n regions of the same method, otherwise different\n method IDs specify different methods."] pub method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief The name of the method. It can be optionally"] - #[doc = " prefixed with its class name and appended with"] - #[doc = " its complete signature. Can't be NULL."] + #[doc = "<\\brief The name of the method. It can be optionally\n prefixed with its class name and appended with\n its complete signature. Can't be NULL."] pub method_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief The start virtual address of the method code"] - #[doc = " region. If NULL, then data provided with the"] - #[doc = " event are not accepted."] + #[doc = "<\\brief The start virtual address of the method code\n region. If NULL, then data provided with the\n event are not accepted."] pub method_load_address: *mut ::std::os::raw::c_void, - #[doc = "<\\brief The code size of the method in memory."] - #[doc = " If 0, then data provided with the event are not"] - #[doc = " accepted."] + #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."] pub method_size: ::std::os::raw::c_uint, - #[doc = "<\\brief The number of entries in the line number"] - #[doc = " table. 0 if none."] + #[doc = "<\\brief The number of entries in the line number\n table. 0 if none."] pub line_number_size: ::std::os::raw::c_uint, - #[doc = "<\\brief Pointer to the line numbers info"] - #[doc = " array. Can be NULL if"] - #[doc = " line_number_size is 0. See"] - #[doc = " LineNumberInfo Structure for a"] - #[doc = " description of a single entry in"] - #[doc = " the line number info array."] + #[doc = "<\\brief Pointer to the line numbers info\n array. Can be NULL if\n line_number_size is 0. See\n LineNumberInfo Structure for a\n description of a single entry in\n the line number info array."] pub line_number_table: pLineNumberInfo, #[doc = "<\\brief Class name. Can be NULL."] pub class_file_name: *mut ::std::os::raw::c_char, #[doc = "<\\brief Source file name. Can be NULL."] pub source_file_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief Module name. Can be NULL."] - #[doc = "The module name can be useful for distinguishing among"] - #[doc = "different JIT engines. VTune Amplifier will display"] - #[doc = "reported methods grouped by specific module."] + #[doc = "<\\brief Module name. Can be NULL.\nThe module name can be useful for distinguishing among\ndifferent JIT engines. VTune Amplifier will display\nreported methods grouped by specific module."] pub module_name: *mut ::std::os::raw::c_char, } #[test] fn bindgen_test_layout__iJIT_Method_Load_V2() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Load_V2> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Load_V2>(), 64usize, @@ -414,7 +256,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { concat!("Alignment of ", stringify!(_iJIT_Method_Load_V2)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -424,9 +266,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -436,10 +276,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_load_address as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -449,9 +286,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -461,9 +296,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).line_number_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -473,9 +306,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).line_number_table as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -485,9 +316,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).class_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -497,9 +326,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).source_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -509,9 +336,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).module_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_name) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -521,81 +346,39 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); } -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load_V2 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load_V2 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2\n as an event type to report it."] pub type piJIT_Method_Load_V2 = *mut _iJIT_Method_Load_V2; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load_V2 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load_V2 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2\n as an event type to report it."] pub type iJIT_Method_Load_V2 = _iJIT_Method_Load_V2; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2"] -#[doc = " with a newly introduced 'arch' field that specifies architecture of the code region."] -#[doc = " When you use the iJIT_Method_Load_V3 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2\n with a newly introduced 'arch' field that specifies architecture of the code region.\n When you use the iJIT_Method_Load_V3 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3\n as an event type to report it."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Load_V3 { - #[doc = "<\\brief Unique method ID. Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or manage ID uniqueness"] - #[doc = " and correct range by yourself.\\n"] - #[doc = " You must use the same method ID for all code"] - #[doc = " regions of the same method, otherwise they are"] - #[doc = " treated as regions of different methods."] + #[doc = "<\\brief Unique method ID. Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or manage ID uniqueness\n and correct range by yourself.\\n\n You must use the same method ID for all code\n regions of the same method, otherwise they are\n treated as regions of different methods."] pub method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief The name of the method. It can be optionally"] - #[doc = " prefixed with its class name and appended with"] - #[doc = " its complete signature. Cannot be NULL."] + #[doc = "<\\brief The name of the method. It can be optionally\n prefixed with its class name and appended with\n its complete signature. Cannot be NULL."] pub method_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief The start virtual address of the method code"] - #[doc = " region. If NULL, then data provided with the"] - #[doc = " event are not accepted."] + #[doc = "<\\brief The start virtual address of the method code\n region. If NULL, then data provided with the\n event are not accepted."] pub method_load_address: *mut ::std::os::raw::c_void, - #[doc = "<\\brief The code size of the method in memory."] - #[doc = " If 0, then data provided with the event are not"] - #[doc = " accepted."] + #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."] pub method_size: ::std::os::raw::c_uint, - #[doc = "<\\brief The number of entries in the line number"] - #[doc = " table. 0 if none."] + #[doc = "<\\brief The number of entries in the line number\n table. 0 if none."] pub line_number_size: ::std::os::raw::c_uint, - #[doc = "<\\brief Pointer to the line numbers info"] - #[doc = " array. Can be NULL if"] - #[doc = " line_number_size is 0. See"] - #[doc = " LineNumberInfo Structure for a"] - #[doc = " description of a single entry in"] - #[doc = " the line number info array."] + #[doc = "<\\brief Pointer to the line numbers info\n array. Can be NULL if\n line_number_size is 0. See\n LineNumberInfo Structure for a\n description of a single entry in\n the line number info array."] pub line_number_table: pLineNumberInfo, #[doc = "<\\brief Class name. Can be NULL."] pub class_file_name: *mut ::std::os::raw::c_char, #[doc = "<\\brief Source file name. Can be NULL."] pub source_file_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief Module name. Can be NULL."] - #[doc = " The module name can be useful for distinguishing among"] - #[doc = " different JIT engines. VTune Amplifier will display"] - #[doc = " reported methods grouped by specific module."] + #[doc = "<\\brief Module name. Can be NULL.\n The module name can be useful for distinguishing among\n different JIT engines. VTune Amplifier will display\n reported methods grouped by specific module."] pub module_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief Architecture of the method's code region."] - #[doc = " By default, it is the same as the process"] - #[doc = " architecture that is calling it."] - #[doc = " For example, you can use it if your 32-bit JIT"] - #[doc = " engine generates 64-bit code."] - #[doc = ""] - #[doc = " If JIT engine reports both 32-bit and 64-bit types"] - #[doc = " of methods then VTune Amplifier splits the methods"] - #[doc = " with the same module name but with different"] - #[doc = " architectures in two different modules. VTune Amplifier"] - #[doc = " modifies the original name provided with a 64-bit method"] - #[doc = " version by ending it with '(64)'"] + #[doc = "<\\brief Architecture of the method's code region.\n By default, it is the same as the process\n architecture that is calling it.\n For example, you can use it if your 32-bit JIT\n engine generates 64-bit code.\n\n If JIT engine reports both 32-bit and 64-bit types\n of methods then VTune Amplifier splits the methods\n with the same module name but with different\n architectures in two different modules. VTune Amplifier\n modifies the original name provided with a 64-bit method\n version by ending it with '(64)'"] pub module_arch: iJIT_CodeArchitecture, } #[test] fn bindgen_test_layout__iJIT_Method_Load_V3() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Load_V3> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Load_V3>(), 72usize, @@ -607,7 +390,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { concat!("Alignment of ", stringify!(_iJIT_Method_Load_V3)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -617,9 +400,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -629,10 +410,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_load_address as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -642,9 +420,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -654,9 +430,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).line_number_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -666,9 +440,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).line_number_table as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -678,9 +450,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).class_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -690,9 +460,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).source_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -702,9 +470,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).module_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_name) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -714,9 +480,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).module_arch as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_arch) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -726,58 +490,26 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); } -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2"] -#[doc = " with a newly introduced 'arch' field that specifies architecture of the code region."] -#[doc = " When you use the iJIT_Method_Load_V3 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2\n with a newly introduced 'arch' field that specifies architecture of the code region.\n When you use the iJIT_Method_Load_V3 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3\n as an event type to report it."] pub type piJIT_Method_Load_V3 = *mut _iJIT_Method_Load_V3; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2"] -#[doc = " with a newly introduced 'arch' field that specifies architecture of the code region."] -#[doc = " When you use the iJIT_Method_Load_V3 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2\n with a newly introduced 'arch' field that specifies architecture of the code region.\n When you use the iJIT_Method_Load_V3 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3\n as an event type to report it."] pub type iJIT_Method_Load_V3 = _iJIT_Method_Load_V3; -#[doc = " @brief Description of an inline JIT-compiled method"] -#[doc = " @details When you use the_iJIT_Method_Inline_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of an inline JIT-compiled method\n @details When you use the_iJIT_Method_Inline_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED\n as an event type to report it."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Inline_Load { - #[doc = "<\\brief Unique method ID. Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or else manage ID uniqueness"] - #[doc = " and correct range by yourself."] + #[doc = "<\\brief Unique method ID. Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or else manage ID uniqueness\n and correct range by yourself."] pub method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief Unique immediate parent's method ID."] - #[doc = " Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or else manage ID uniqueness"] - #[doc = " and correct range by yourself."] + #[doc = "<\\brief Unique immediate parent's method ID.\n Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or else manage ID uniqueness\n and correct range by yourself."] pub parent_method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief The name of the method. It can be optionally"] - #[doc = " prefixed with its class name and appended with"] - #[doc = " its complete signature. Can't be NULL."] + #[doc = "<\\brief The name of the method. It can be optionally\n prefixed with its class name and appended with\n its complete signature. Can't be NULL."] pub method_name: *mut ::std::os::raw::c_char, pub method_load_address: *mut ::std::os::raw::c_void, - #[doc = "<\\brief The code size of the method in memory."] - #[doc = " If 0, then data provided with the event are not"] - #[doc = " accepted."] + #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."] pub method_size: ::std::os::raw::c_uint, - #[doc = "<\\brief The number of entries in the line number"] - #[doc = " table. 0 if none."] + #[doc = "<\\brief The number of entries in the line number\n table. 0 if none."] pub line_number_size: ::std::os::raw::c_uint, - #[doc = "<\\brief Pointer to the line numbers info"] - #[doc = " array. Can be NULL if"] - #[doc = " line_number_size is 0. See"] - #[doc = " LineNumberInfo Structure for a"] - #[doc = " description of a single entry in"] - #[doc = " the line number info array"] + #[doc = "<\\brief Pointer to the line numbers info\n array. Can be NULL if\n line_number_size is 0. See\n LineNumberInfo Structure for a\n description of a single entry in\n the line number info array"] pub line_number_table: pLineNumberInfo, #[doc = "<\\brief Class name. Can be NULL."] pub class_file_name: *mut ::std::os::raw::c_char, @@ -786,6 +518,9 @@ pub struct _iJIT_Method_Inline_Load { } #[test] fn bindgen_test_layout__iJIT_Method_Inline_Load() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Inline_Load> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Inline_Load>(), 56usize, @@ -797,9 +532,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { concat!("Alignment of ", stringify!(_iJIT_Method_Inline_Load)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_id as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -809,10 +542,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).parent_method_id as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).parent_method_id) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -822,9 +552,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -834,10 +562,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_load_address as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -847,9 +572,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -859,10 +582,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).line_number_size as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -872,10 +592,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).line_number_table as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -885,10 +602,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).class_file_name as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -898,10 +612,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).source_file_name as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -911,77 +622,23 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); } -#[doc = " @brief Description of an inline JIT-compiled method"] -#[doc = " @details When you use the_iJIT_Method_Inline_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of an inline JIT-compiled method\n @details When you use the_iJIT_Method_Inline_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED\n as an event type to report it."] pub type piJIT_Method_Inline_Load = *mut _iJIT_Method_Inline_Load; -#[doc = " @brief Description of an inline JIT-compiled method"] -#[doc = " @details When you use the_iJIT_Method_Inline_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of an inline JIT-compiled method\n @details When you use the_iJIT_Method_Inline_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED\n as an event type to report it."] pub type iJIT_Method_Inline_Load = _iJIT_Method_Inline_Load; pub const _iJIT_SegmentType_iJIT_CT_UNKNOWN: _iJIT_SegmentType = 0; #[doc = "<\\brief Executable code."] pub const _iJIT_SegmentType_iJIT_CT_CODE: _iJIT_SegmentType = 1; -#[doc = "<\\brief Data (not executable code)."] -#[doc = " VTune Amplifier uses the format string"] -#[doc = " (see iJIT_Method_Update) to represent"] -#[doc = " this data in the VTune Amplifier GUI"] +#[doc = "<\\brief Data (not executable code).\n VTune Amplifier uses the format string\n (see iJIT_Method_Update) to represent\n this data in the VTune Amplifier GUI"] pub const _iJIT_SegmentType_iJIT_CT_DATA: _iJIT_SegmentType = 2; -#[doc = "<\\brief Use the previous markup for the trace."] -#[doc = " Can be used for the following"] -#[doc = " iJVM_EVENT_TYPE_METHOD_UPDATE_V2 events,"] -#[doc = " if the type of the previously reported segment"] -#[doc = " type is the same."] +#[doc = "<\\brief Use the previous markup for the trace.\n Can be used for the following\n iJVM_EVENT_TYPE_METHOD_UPDATE_V2 events,\n if the type of the previously reported segment\n type is the same."] pub const _iJIT_SegmentType_iJIT_CT_KEEP: _iJIT_SegmentType = 3; pub const _iJIT_SegmentType_iJIT_CT_EOF: _iJIT_SegmentType = 4; -#[doc = " @cond exclude_from_documentation */"] -#[doc = " @brief Description of a segment type"] -#[doc = " @details Use the segment type to specify a type of data supplied"] -#[doc = " with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to"] -#[doc = " a certain code trace."] +#[doc = " @cond exclude_from_documentation */\n/**\n @brief Description of a segment type\n @details Use the segment type to specify a type of data supplied\n with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to\n a certain code trace."] pub type _iJIT_SegmentType = ::std::os::raw::c_uint; -#[doc = " @cond exclude_from_documentation */"] -#[doc = " @brief Description of a segment type"] -#[doc = " @details Use the segment type to specify a type of data supplied"] -#[doc = " with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to"] -#[doc = " a certain code trace."] +#[doc = " @cond exclude_from_documentation */\n/**\n @brief Description of a segment type\n @details Use the segment type to specify a type of data supplied\n with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to\n a certain code trace."] pub use self::_iJIT_SegmentType as iJIT_SegmentType; -#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method"] -#[doc = " @details The JIT engine may generate the methods that are updated at runtime"] -#[doc = " partially by mixed (data + executable code) content. When you use the iJIT_Method_Update"] -#[doc = " structure to describe the update of the content within a JIT-compiled method,"] -#[doc = " use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it."] -#[doc = ""] -#[doc = " On the first Update event, VTune Amplifier copies the original code range reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and"] -#[doc = " adds the modified range to the original method. For next update events, VTune Amplifier"] -#[doc = " does the same but it uses the latest modified version of a code region for update."] -#[doc = " Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event."] -#[doc = " Notes:"] -#[doc = " - Multiple update events with different types for the same trace are allowed"] -#[doc = " but they must be reported for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [code] Ignored"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] -#[doc = " - The types of previously reported events can be changed but they must be reported"] -#[doc = " for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] +#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method\n @details The JIT engine may generate the methods that are updated at runtime\n partially by mixed (data + executable code) content. When you use the iJIT_Method_Update\n structure to describe the update of the content within a JIT-compiled method,\n use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it.\n\n On the first Update event, VTune Amplifier copies the original code range reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and\n adds the modified range to the original method. For next update events, VTune Amplifier\n does the same but it uses the latest modified version of a code region for update.\n Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event.\n Notes:\n - Multiple update events with different types for the same trace are allowed\n but they must be reported for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [code] Ignored\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode\n - The types of previously reported events can be changed but they must be reported\n for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Update { @@ -991,15 +648,13 @@ pub struct _iJIT_Method_Update { pub size: ::std::os::raw::c_uint, #[doc = "<\\brief Type of the update"] pub type_: iJIT_SegmentType, - #[doc = "<\\brief C string that contains a format string"] - #[doc = " that follows the same specifications as format in printf."] - #[doc = " The format string is used for iJIT_CT_CODE only"] - #[doc = " and cannot be NULL."] - #[doc = " Format can be changed on the fly."] + #[doc = "<\\brief C string that contains a format string\n that follows the same specifications as format in printf.\n The format string is used for iJIT_CT_CODE only\n and cannot be NULL.\n Format can be changed on the fly."] pub data_format: *const ::std::os::raw::c_char, } #[test] fn bindgen_test_layout__iJIT_Method_Update() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Update> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Update>(), 24usize, @@ -1011,9 +666,7 @@ fn bindgen_test_layout__iJIT_Method_Update() { concat!("Alignment of ", stringify!(_iJIT_Method_Update)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Update>())).load_address as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).load_address) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1023,7 +676,7 @@ fn bindgen_test_layout__iJIT_Method_Update() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Update>())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1033,7 +686,7 @@ fn bindgen_test_layout__iJIT_Method_Update() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Update>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -1043,7 +696,7 @@ fn bindgen_test_layout__iJIT_Method_Update() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Update>())).data_format as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data_format) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1053,106 +706,20 @@ fn bindgen_test_layout__iJIT_Method_Update() { ) ); } -#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method"] -#[doc = " @details The JIT engine may generate the methods that are updated at runtime"] -#[doc = " partially by mixed (data + executable code) content. When you use the iJIT_Method_Update"] -#[doc = " structure to describe the update of the content within a JIT-compiled method,"] -#[doc = " use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it."] -#[doc = ""] -#[doc = " On the first Update event, VTune Amplifier copies the original code range reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and"] -#[doc = " adds the modified range to the original method. For next update events, VTune Amplifier"] -#[doc = " does the same but it uses the latest modified version of a code region for update."] -#[doc = " Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event."] -#[doc = " Notes:"] -#[doc = " - Multiple update events with different types for the same trace are allowed"] -#[doc = " but they must be reported for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [code] Ignored"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] -#[doc = " - The types of previously reported events can be changed but they must be reported"] -#[doc = " for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] +#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method\n @details The JIT engine may generate the methods that are updated at runtime\n partially by mixed (data + executable code) content. When you use the iJIT_Method_Update\n structure to describe the update of the content within a JIT-compiled method,\n use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it.\n\n On the first Update event, VTune Amplifier copies the original code range reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and\n adds the modified range to the original method. For next update events, VTune Amplifier\n does the same but it uses the latest modified version of a code region for update.\n Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event.\n Notes:\n - Multiple update events with different types for the same trace are allowed\n but they must be reported for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [code] Ignored\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode\n - The types of previously reported events can be changed but they must be reported\n for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode"] pub type piJIT_Method_Update = *mut _iJIT_Method_Update; -#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method"] -#[doc = " @details The JIT engine may generate the methods that are updated at runtime"] -#[doc = " partially by mixed (data + executable code) content. When you use the iJIT_Method_Update"] -#[doc = " structure to describe the update of the content within a JIT-compiled method,"] -#[doc = " use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it."] -#[doc = ""] -#[doc = " On the first Update event, VTune Amplifier copies the original code range reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and"] -#[doc = " adds the modified range to the original method. For next update events, VTune Amplifier"] -#[doc = " does the same but it uses the latest modified version of a code region for update."] -#[doc = " Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event."] -#[doc = " Notes:"] -#[doc = " - Multiple update events with different types for the same trace are allowed"] -#[doc = " but they must be reported for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [code] Ignored"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] -#[doc = " - The types of previously reported events can be changed but they must be reported"] -#[doc = " for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] +#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method\n @details The JIT engine may generate the methods that are updated at runtime\n partially by mixed (data + executable code) content. When you use the iJIT_Method_Update\n structure to describe the update of the content within a JIT-compiled method,\n use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it.\n\n On the first Update event, VTune Amplifier copies the original code range reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and\n adds the modified range to the original method. For next update events, VTune Amplifier\n does the same but it uses the latest modified version of a code region for update.\n Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event.\n Notes:\n - Multiple update events with different types for the same trace are allowed\n but they must be reported for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [code] Ignored\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode\n - The types of previously reported events can be changed but they must be reported\n for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode"] pub type iJIT_Method_Update = _iJIT_Method_Update; extern "C" { - #[doc = " @brief Generates a new unique method ID."] - #[doc = ""] - #[doc = " You must use this API to obtain unique and valid method IDs for methods or"] - #[doc = " traces reported to the agent if you don't have your own mechanism to generate"] - #[doc = " unique method IDs."] - #[doc = ""] - #[doc = " @return a new unique method ID. When out of unique method IDs, this API"] - #[doc = " returns 0, which is not an accepted value."] + #[doc = " @brief Generates a new unique method ID.\n\n You must use this API to obtain unique and valid method IDs for methods or\n traces reported to the agent if you don't have your own mechanism to generate\n unique method IDs.\n\n @return a new unique method ID. When out of unique method IDs, this API\n returns 0, which is not an accepted value."] pub fn iJIT_GetNewMethodID() -> ::std::os::raw::c_uint; } extern "C" { - #[doc = " @brief Returns the current mode of the agent."] - #[doc = ""] - #[doc = " @return iJIT_SAMPLING_ON, indicating that agent is running, or"] - #[doc = " iJIT_NOTHING_RUNNING if no agent is running."] + #[doc = " @brief Returns the current mode of the agent.\n\n @return iJIT_SAMPLING_ON, indicating that agent is running, or\n iJIT_NOTHING_RUNNING if no agent is running."] pub fn iJIT_IsProfilingActive() -> iJIT_IsProfilingActiveFlags; } extern "C" { - #[doc = " @brief Reports infomation about JIT-compiled code to the agent."] - #[doc = ""] - #[doc = " The reported information is used to attribute samples obtained from any"] - #[doc = " Intel(R) VTune(TM) Amplifier collector. This API needs to be called"] - #[doc = " after JIT compilation and before the first entry into the JIT-compiled"] - #[doc = " code."] - #[doc = ""] - #[doc = " @param[in] event_type - type of the data sent to the agent"] - #[doc = " @param[in] EventSpecificData - pointer to event-specific data"] - #[doc = ""] - #[doc = " @returns 1 on success, otherwise 0."] + #[doc = " @brief Reports infomation about JIT-compiled code to the agent.\n\n The reported information is used to attribute samples obtained from any\n Intel(R) VTune(TM) Amplifier collector. This API needs to be called\n after JIT compilation and before the first entry into the JIT-compiled\n code.\n\n @param[in] event_type - type of the data sent to the agent\n @param[in] EventSpecificData - pointer to event-specific data\n\n @returns 1 on success, otherwise 0."] pub fn iJIT_NotifyEvent( event_type: iJIT_JVM_EVENT, EventSpecificData: *mut ::std::os::raw::c_void, diff --git a/rust/ittapi-sys/src/macos/ittnotify_bindings.rs b/rust/ittapi-sys/src/macos/ittnotify_bindings.rs index 1abded9..bc065b2 100644 --- a/rust/ittapi-sys/src/macos/ittnotify_bindings.rs +++ b/rust/ittapi-sys/src/macos/ittnotify_bindings.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.59.2 */ +/* automatically generated by rust-bindgen 0.68.1 */ pub const ITT_OS_WIN: u32 = 1; pub const ITT_OS_LINUX: u32 = 2; @@ -24,12 +24,10 @@ pub const __itt_heap_growth: u32 = 2; pub const __itt_section_exec: u32 = 536870912; pub const __itt_section_read: u32 = 1073741824; pub const __itt_section_write: u32 = 2147483648; -pub type size_t = ::std::os::raw::c_ulong; pub const __itt_collection_scope___itt_collection_scope_host: __itt_collection_scope = 1; pub const __itt_collection_scope___itt_collection_scope_offload: __itt_collection_scope = 2; pub const __itt_collection_scope___itt_collection_scope_all: __itt_collection_scope = 2147483647; -#[doc = " @enum __itt_collection_scope"] -#[doc = " @brief Enumerator for collection scopes"] +#[doc = " @enum __itt_collection_scope\n @brief Enumerator for collection scopes"] pub type __itt_collection_scope = ::std::os::raw::c_uint; pub type __itt_pause_ptr__3_0_t = ::std::option::Option; extern "C" { @@ -53,13 +51,7 @@ pub type __itt_detach_ptr__3_0_t = ::std::option::Option extern "C" { pub static mut __itt_detach_ptr__3_0: __itt_detach_ptr__3_0_t; } -#[doc = " @defgroup Intel Processor Trace control"] -#[doc = " API from this group provides control over collection and analysis of Intel Processor Trace (Intel PT) data"] -#[doc = " Information about Intel Processor Trace technology can be found here (Volume 3 chapter 35):"] -#[doc = " https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf"] -#[doc = " Use this API to mark particular code regions for loading detailed performance statistics."] -#[doc = " This mode makes your analysis faster and more accurate."] -#[doc = " @{"] +#[doc = " @defgroup Intel Processor Trace control\n API from this group provides control over collection and analysis of Intel Processor Trace (Intel PT) data\n Information about Intel Processor Trace technology can be found here (Volume 3 chapter 35):\n https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf\n Use this API to mark particular code regions for loading detailed performance statistics.\n This mode makes your analysis faster and more accurate.\n @{"] pub type __itt_pt_region = ::std::os::raw::c_uchar; pub type __itt_pt_region_create_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn(name: *const ::std::os::raw::c_char) -> __itt_pt_region, @@ -87,18 +79,16 @@ extern "C" { } pub const __itt_suppress_mode___itt_unsuppress_range: __itt_suppress_mode = 0; pub const __itt_suppress_mode___itt_suppress_range: __itt_suppress_mode = 1; -#[doc = " @enum __itt_suppress_mode"] -#[doc = " @brief Enumerator for the suppressing modes"] +#[doc = " @enum __itt_suppress_mode\n @brief Enumerator for the suppressing modes"] pub type __itt_suppress_mode = ::std::os::raw::c_uint; -#[doc = " @enum __itt_suppress_mode"] -#[doc = " @brief Enumerator for the suppressing modes"] +#[doc = " @enum __itt_suppress_mode\n @brief Enumerator for the suppressing modes"] pub use self::__itt_suppress_mode as __itt_suppress_mode_t; pub type __itt_suppress_mark_range_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( mode: __itt_suppress_mode_t, mask: ::std::os::raw::c_uint, address: *mut ::std::os::raw::c_void, - size: size_t, + size: usize, ), >; extern "C" { @@ -109,7 +99,7 @@ pub type __itt_suppress_clear_range_ptr__3_0_t = ::std::option::Option< mode: __itt_suppress_mode_t, mask: ::std::os::raw::c_uint, address: *mut ::std::os::raw::c_void, - size: size_t, + size: usize, ), >; extern "C" { @@ -183,8 +173,7 @@ pub type __itt_model_task = *mut ::std::os::raw::c_void; pub type __itt_model_task_instance = *mut ::std::os::raw::c_void; pub const __itt_model_disable___itt_model_disable_observation: __itt_model_disable = 0; pub const __itt_model_disable___itt_model_disable_collection: __itt_model_disable = 1; -#[doc = " @enum __itt_model_disable"] -#[doc = " @brief Enumerator for the disable methods"] +#[doc = " @enum __itt_model_disable\n @brief Enumerator for the disable methods"] pub type __itt_model_disable = ::std::os::raw::c_uint; pub type __itt_model_site_begin_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -202,7 +191,7 @@ extern "C" { pub static mut __itt_model_site_beginA_ptr__3_0: __itt_model_site_beginA_ptr__3_0_t; } pub type __itt_model_site_beginAL_ptr__3_0_t = ::std::option::Option< - unsafe extern "C" fn(name: *const ::std::os::raw::c_char, siteNameLen: size_t), + unsafe extern "C" fn(name: *const ::std::os::raw::c_char, siteNameLen: usize), >; extern "C" { pub static mut __itt_model_site_beginAL_ptr__3_0: __itt_model_site_beginAL_ptr__3_0_t; @@ -233,7 +222,7 @@ extern "C" { pub static mut __itt_model_task_beginA_ptr__3_0: __itt_model_task_beginA_ptr__3_0_t; } pub type __itt_model_task_beginAL_ptr__3_0_t = ::std::option::Option< - unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: size_t), + unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: usize), >; extern "C" { pub static mut __itt_model_task_beginAL_ptr__3_0: __itt_model_task_beginAL_ptr__3_0_t; @@ -244,7 +233,7 @@ extern "C" { pub static mut __itt_model_iteration_taskA_ptr__3_0: __itt_model_iteration_taskA_ptr__3_0_t; } pub type __itt_model_iteration_taskAL_ptr__3_0_t = ::std::option::Option< - unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: size_t), + unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: usize), >; extern "C" { pub static mut __itt_model_iteration_taskAL_ptr__3_0: __itt_model_iteration_taskAL_ptr__3_0_t; @@ -280,7 +269,7 @@ extern "C" { pub static mut __itt_model_lock_release_2_ptr__3_0: __itt_model_lock_release_2_ptr__3_0_t; } pub type __itt_model_record_allocation_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_record_allocation_ptr__3_0: __itt_model_record_allocation_ptr__3_0_t; } @@ -291,17 +280,17 @@ extern "C" { __itt_model_record_deallocation_ptr__3_0_t; } pub type __itt_model_induction_uses_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_induction_uses_ptr__3_0: __itt_model_induction_uses_ptr__3_0_t; } pub type __itt_model_reduction_uses_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_reduction_uses_ptr__3_0: __itt_model_reduction_uses_ptr__3_0_t; } pub type __itt_model_observe_uses_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_observe_uses_ptr__3_0: __itt_model_observe_uses_ptr__3_0_t; } @@ -320,14 +309,11 @@ extern "C" { pub static mut __itt_model_disable_pop_ptr__3_0: __itt_model_disable_pop_ptr__3_0_t; } pub type __itt_model_aggregate_task_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_aggregate_task_ptr__3_0: __itt_model_aggregate_task_ptr__3_0_t; } -#[doc = " @defgroup heap Heap"] -#[doc = " @ingroup public"] -#[doc = " Heap group"] -#[doc = " @{"] +#[doc = " @defgroup heap Heap\n @ingroup public\n Heap group\n @{"] pub type __itt_heap_function = *mut ::std::os::raw::c_void; pub type __itt_heap_function_create_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -339,7 +325,7 @@ extern "C" { pub static mut __itt_heap_function_create_ptr__3_0: __itt_heap_function_create_ptr__3_0_t; } pub type __itt_heap_allocate_begin_ptr__3_0_t = ::std::option::Option< - unsafe extern "C" fn(h: __itt_heap_function, size: size_t, initialized: ::std::os::raw::c_int), + unsafe extern "C" fn(h: __itt_heap_function, size: usize, initialized: ::std::os::raw::c_int), >; extern "C" { pub static mut __itt_heap_allocate_begin_ptr__3_0: __itt_heap_allocate_begin_ptr__3_0_t; @@ -348,7 +334,7 @@ pub type __itt_heap_allocate_end_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( h: __itt_heap_function, addr: *mut *mut ::std::os::raw::c_void, - size: size_t, + size: usize, initialized: ::std::os::raw::c_int, ), >; @@ -371,7 +357,7 @@ pub type __itt_heap_reallocate_begin_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( h: __itt_heap_function, addr: *mut ::std::os::raw::c_void, - new_size: size_t, + new_size: usize, initialized: ::std::os::raw::c_int, ), >; @@ -383,7 +369,7 @@ pub type __itt_heap_reallocate_end_ptr__3_0_t = ::std::option::Option< h: __itt_heap_function, addr: *mut ::std::os::raw::c_void, new_addr: *mut *mut ::std::os::raw::c_void, - new_size: size_t, + new_size: usize, initialized: ::std::os::raw::c_int, ), >; @@ -439,6 +425,8 @@ pub struct ___itt_domain { } #[test] fn bindgen_test_layout____itt_domain() { + const UNINIT: ::std::mem::MaybeUninit<___itt_domain> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_domain>(), 48usize, @@ -450,7 +438,7 @@ fn bindgen_test_layout____itt_domain() { concat!("Alignment of ", stringify!(___itt_domain)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -460,7 +448,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).nameA as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameA) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -470,7 +458,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).nameW as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameW) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -480,7 +468,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -490,7 +478,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -500,7 +488,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -526,6 +514,8 @@ pub struct ___itt_id { } #[test] fn bindgen_test_layout____itt_id() { + const UNINIT: ::std::mem::MaybeUninit<___itt_id> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_id>(), 24usize, @@ -537,7 +527,7 @@ fn bindgen_test_layout____itt_id() { concat!("Alignment of ", stringify!(___itt_id)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_id>())).d1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).d1) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -547,7 +537,7 @@ fn bindgen_test_layout____itt_id() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_id>())).d2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).d2) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -557,7 +547,7 @@ fn bindgen_test_layout____itt_id() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_id>())).d3 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).d3) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -596,6 +586,8 @@ pub struct ___itt_string_handle { } #[test] fn bindgen_test_layout____itt_string_handle() { + const UNINIT: ::std::mem::MaybeUninit<___itt_string_handle> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_string_handle>(), 40usize, @@ -607,7 +599,7 @@ fn bindgen_test_layout____itt_string_handle() { concat!("Alignment of ", stringify!(___itt_string_handle)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).strA as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).strA) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -617,7 +609,7 @@ fn bindgen_test_layout____itt_string_handle() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).strW as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).strW) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -627,7 +619,7 @@ fn bindgen_test_layout____itt_string_handle() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -637,7 +629,7 @@ fn bindgen_test_layout____itt_string_handle() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -647,7 +639,7 @@ fn bindgen_test_layout____itt_string_handle() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -798,8 +790,7 @@ pub const __itt_metadata_type___itt_metadata_s16: __itt_metadata_type = 6; pub const __itt_metadata_type___itt_metadata_float: __itt_metadata_type = 7; #[doc = "< SIgned 64-bit floating-point"] pub const __itt_metadata_type___itt_metadata_double: __itt_metadata_type = 8; -#[doc = " @ingroup parameters"] -#[doc = " @brief describes the type of metadata"] +#[doc = " @ingroup parameters\n @brief describes the type of metadata"] pub type __itt_metadata_type = ::std::os::raw::c_uint; pub type __itt_metadata_add_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -807,7 +798,7 @@ pub type __itt_metadata_add_ptr__3_0_t = ::std::option::Option< id: __itt_id, key: *mut __itt_string_handle, type_: __itt_metadata_type, - count: size_t, + count: usize, data: *mut ::std::os::raw::c_void, ), >; @@ -820,7 +811,7 @@ pub type __itt_metadata_str_add_ptr__3_0_t = ::std::option::Option< id: __itt_id, key: *mut __itt_string_handle, data: *const ::std::os::raw::c_char, - length: size_t, + length: usize, ), >; extern "C" { @@ -832,7 +823,7 @@ pub type __itt_metadata_add_with_scope_ptr__3_0_t = ::std::option::Option< scope: __itt_scope, key: *mut __itt_string_handle, type_: __itt_metadata_type, - count: size_t, + count: usize, data: *mut ::std::os::raw::c_void, ), >; @@ -845,7 +836,7 @@ pub type __itt_metadata_str_add_with_scope_ptr__3_0_t = ::std::option::Option< scope: __itt_scope, key: *mut __itt_string_handle, data: *const ::std::os::raw::c_char, - length: size_t, + length: usize, ), >; extern "C" { @@ -867,13 +858,7 @@ pub const __itt_relation___itt_relation_is_child_of: __itt_relation = 5; pub const __itt_relation___itt_relation_is_continued_by: __itt_relation = 6; #[doc = "< \"A is predecessor to B\" means that B cannot start until A completes (inverse of is_dependent_on)"] pub const __itt_relation___itt_relation_is_predecessor_to: __itt_relation = 7; -#[doc = " @ingroup relations"] -#[doc = " @brief The kind of relation between two instances is specified by the enumerated type __itt_relation."] -#[doc = " Relations between instances can be added with an API call. The relation"] -#[doc = " API uses instance IDs. Relations can be added before or after the actual"] -#[doc = " instances are created and persist independently of the instances. This"] -#[doc = " is the motivation for having different lifetimes for instance IDs and"] -#[doc = " the actual instances."] +#[doc = " @ingroup relations\n @brief The kind of relation between two instances is specified by the enumerated type __itt_relation.\n Relations between instances can be added with an API call. The relation\n API uses instance IDs. Relations can be added before or after the actual\n instances are created and persist independently of the instances. This\n is the motivation for having different lifetimes for instance IDs and\n the actual instances."] pub type __itt_relation = ::std::os::raw::c_uint; pub type __itt_relation_add_to_current_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn(domain: *const __itt_domain, relation: __itt_relation, tail: __itt_id), @@ -902,6 +887,8 @@ pub struct ___itt_clock_info { } #[test] fn bindgen_test_layout____itt_clock_info() { + const UNINIT: ::std::mem::MaybeUninit<___itt_clock_info> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_clock_info>(), 16usize, @@ -913,7 +900,7 @@ fn bindgen_test_layout____itt_clock_info() { concat!("Alignment of ", stringify!(___itt_clock_info)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_info>())).clock_freq as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clock_freq) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -923,7 +910,7 @@ fn bindgen_test_layout____itt_clock_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_info>())).clock_base as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clock_base) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -955,6 +942,8 @@ pub struct ___itt_clock_domain { } #[test] fn bindgen_test_layout____itt_clock_domain() { + const UNINIT: ::std::mem::MaybeUninit<___itt_clock_domain> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_clock_domain>(), 56usize, @@ -966,7 +955,7 @@ fn bindgen_test_layout____itt_clock_domain() { concat!("Alignment of ", stringify!(___itt_clock_domain)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).info as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).info) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -976,7 +965,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).fn_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -986,7 +975,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).fn_data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fn_data) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -996,7 +985,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1006,7 +995,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1016,7 +1005,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -1103,7 +1092,7 @@ extern "C" { pub struct ___itt_counter { _unused: [u8; 0], } -#[doc = " @brief opaque structure for counter identification"] +#[doc = " @brief opaque structure for counter identification\n/\n/** @cond exclude_from_documentation"] pub type __itt_counter = *mut ___itt_counter; pub type __itt_counter_create_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -1261,6 +1250,8 @@ pub struct ___itt_track_group { } #[test] fn bindgen_test_layout____itt_track_group() { + const UNINIT: ::std::mem::MaybeUninit<___itt_track_group> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_track_group>(), 40usize, @@ -1272,7 +1263,7 @@ fn bindgen_test_layout____itt_track_group() { concat!("Alignment of ", stringify!(___itt_track_group)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1282,7 +1273,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).track as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).track) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1292,7 +1283,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).tgtype as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tgtype) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1302,7 +1293,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -1312,7 +1303,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1322,7 +1313,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1334,11 +1325,9 @@ fn bindgen_test_layout____itt_track_group() { } pub type __itt_track_group = ___itt_track_group; pub const ___itt_track_type___itt_track_type_normal: ___itt_track_type = 0; -#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track"] -#[doc = " is the only available track type."] +#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track\n is the only available track type."] pub type ___itt_track_type = ::std::os::raw::c_uint; -#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track"] -#[doc = " is the only available track type."] +#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track\n is the only available track type."] pub use self::___itt_track_type as __itt_track_type; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1357,6 +1346,8 @@ pub struct ___itt_track { } #[test] fn bindgen_test_layout____itt_track() { + const UNINIT: ::std::mem::MaybeUninit<___itt_track> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_track>(), 40usize, @@ -1368,7 +1359,7 @@ fn bindgen_test_layout____itt_track() { concat!("Alignment of ", stringify!(___itt_track)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1378,7 +1369,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).group as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1388,7 +1379,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).ttype as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ttype) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1398,7 +1389,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -1408,7 +1399,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1418,7 +1409,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1453,11 +1444,7 @@ pub type __itt_set_track_ptr__3_0_t = extern "C" { pub static mut __itt_set_track_ptr__3_0: __itt_set_track_ptr__3_0_t; } -#[doc = " @cond exclude_from_gpa_documentation */"] -#[doc = " @defgroup events Events"] -#[doc = " @ingroup public"] -#[doc = " Events group"] -#[doc = " @{"] +#[doc = " @cond exclude_from_gpa_documentation */\n/**\n @defgroup events Events\n @ingroup public\n Events group\n @{\n/\n/** @brief user event type"] pub type __itt_event = ::std::os::raw::c_int; pub type __itt_event_create_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -1528,18 +1515,19 @@ pub struct ___itt_section_info { pub name: *const ::std::os::raw::c_char, #[doc = "< Section content and semantics description"] pub type_: __itt_section_type, - #[doc = "< Section bit flags that describe attributes using bit mask"] - #[doc = " Zero if disabled, non-zero if enabled"] - pub flags: size_t, + #[doc = "< Section bit flags that describe attributes using bit mask\n Zero if disabled, non-zero if enabled"] + pub flags: usize, #[doc = "< Section load(relocated) start address"] pub start_addr: *mut ::std::os::raw::c_void, #[doc = "< Section file offset"] - pub size: size_t, + pub size: usize, #[doc = "< Section size"] - pub file_offset: size_t, + pub file_offset: usize, } #[test] fn bindgen_test_layout____itt_section_info() { + const UNINIT: ::std::mem::MaybeUninit<___itt_section_info> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_section_info>(), 48usize, @@ -1551,7 +1539,7 @@ fn bindgen_test_layout____itt_section_info() { concat!("Alignment of ", stringify!(___itt_section_info)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1561,7 +1549,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1571,7 +1559,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1581,7 +1569,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).start_addr as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).start_addr) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1591,7 +1579,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1601,7 +1589,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).file_offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).file_offset) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1621,24 +1609,20 @@ pub struct ___itt_module_object { pub module_id: __itt_id, #[doc = "< Binary module format"] pub module_type: __itt_module_type, - #[doc = "< Unique module name or path to module in UTF8"] - #[doc = " Contains module name when module_bufer and module_size exist"] - #[doc = " Contains module path when module_bufer and module_size absent"] - #[doc = " module_name remains the same for the certain module_id"] + #[doc = "< Unique module name or path to module in UTF8\n Contains module name when module_bufer and module_size exist\n Contains module path when module_bufer and module_size absent\n module_name remains the same for the certain module_id"] pub module_name: *const ::std::os::raw::c_char, #[doc = "< Module buffer content"] pub module_buffer: *mut ::std::os::raw::c_void, - #[doc = "< Module buffer size */"] - #[doc = " If module_buffer and module_size do not exist,"] - #[doc = " the binary module exists on the system already."] - #[doc = " The module_name parameter contains the path to the module."] - pub module_size: size_t, + #[doc = "< Module buffer size */\n/*!< If module_buffer and module_size exist, the binary module is dumped onto the system.\n If module_buffer and module_size do not exist,\n the binary module exists on the system already.\n The module_name parameter contains the path to the module."] + pub module_size: usize, #[doc = "< Reference to section information"] pub section_array: *mut __itt_section_info, - pub section_number: size_t, + pub section_number: usize, } #[test] fn bindgen_test_layout____itt_module_object() { + const UNINIT: ::std::mem::MaybeUninit<___itt_module_object> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_module_object>(), 80usize, @@ -1650,7 +1634,7 @@ fn bindgen_test_layout____itt_module_object() { concat!("Alignment of ", stringify!(___itt_module_object)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_module_object>())).version as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1660,7 +1644,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_module_object>())).module_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).module_id) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1670,9 +1654,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).module_type as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_type) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1682,9 +1664,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).module_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_name) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1694,9 +1674,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).module_buffer as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_buffer) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -1706,9 +1684,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).module_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_size) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -1718,9 +1694,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).section_array as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).section_array) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -1730,9 +1704,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).section_number as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).section_number) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -1775,6 +1747,8 @@ pub struct ___itt_histogram { } #[test] fn bindgen_test_layout____itt_histogram() { + const UNINIT: ::std::mem::MaybeUninit<___itt_histogram> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_histogram>(), 56usize, @@ -1786,7 +1760,7 @@ fn bindgen_test_layout____itt_histogram() { concat!("Alignment of ", stringify!(___itt_histogram)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).domain as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).domain) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1796,7 +1770,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).nameA as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameA) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1806,7 +1780,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).nameW as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameW) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1816,7 +1790,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).x_type as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).x_type) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1826,7 +1800,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).y_type as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).y_type) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -1836,7 +1810,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1846,7 +1820,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1856,7 +1830,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -1881,7 +1855,7 @@ extern "C" { pub type __itt_histogram_submit_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( hist: *mut __itt_histogram, - length: size_t, + length: usize, x_data: *mut ::std::os::raw::c_void, y_data: *mut ::std::os::raw::c_void, ), @@ -1953,6 +1927,9 @@ pub struct ___itt_context_metadata { } #[test] fn bindgen_test_layout____itt_context_metadata() { + const UNINIT: ::std::mem::MaybeUninit<___itt_context_metadata> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_context_metadata>(), 16usize, @@ -1964,7 +1941,7 @@ fn bindgen_test_layout____itt_context_metadata() { concat!("Alignment of ", stringify!(___itt_context_metadata)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_context_metadata>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1974,7 +1951,7 @@ fn bindgen_test_layout____itt_context_metadata() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_context_metadata>())).value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1988,7 +1965,7 @@ pub type __itt_context_metadata = ___itt_context_metadata; pub type __itt_bind_context_metadata_to_counter_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( counter: __itt_counter, - length: size_t, + length: usize, metadata: *mut __itt_context_metadata, ), >; diff --git a/rust/ittapi-sys/src/macos/jitprofiling_bindings.rs b/rust/ittapi-sys/src/macos/jitprofiling_bindings.rs index 8654fc5..428296c 100644 --- a/rust/ittapi-sys/src/macos/jitprofiling_bindings.rs +++ b/rust/ittapi-sys/src/macos/jitprofiling_bindings.rs @@ -1,91 +1,34 @@ -/* automatically generated by rust-bindgen 0.59.2 */ +/* automatically generated by rust-bindgen 0.68.1 */ -#[doc = "<\\brief Send this to shutdown the agent."] -#[doc = " Use NULL for event data."] +#[doc = "<\\brief Send this to shutdown the agent.\n Use NULL for event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_SHUTDOWN: iJIT_jvm_event = 2; -#[doc = "<\\brief Send when dynamic code is"] -#[doc = " JIT compiled and loaded into"] -#[doc = " memory by the JIT engine, but"] -#[doc = " before the code is executed."] -#[doc = " Use iJIT_Method_Load as event"] -#[doc = " data."] +#[doc = "<\\brief Send when dynamic code is\n JIT compiled and loaded into\n memory by the JIT engine, but\n before the code is executed.\n Use iJIT_Method_Load as event\n data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED: iJIT_jvm_event = 13; -#[doc = "<\\brief Send when compiled dynamic"] -#[doc = " code is being unloaded from memory."] -#[doc = " Use iJIT_Method_Load as event data."] +#[doc = "<\\brief Send when compiled dynamic\n code is being unloaded from memory.\n Use iJIT_Method_Load as event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UNLOAD_START: iJIT_jvm_event = 14; -#[doc = "<\\brief Send to provide new content for"] -#[doc = " a previously reported dynamic code."] -#[doc = " The previous content will be invalidated"] -#[doc = " starting from the time of the notification."] -#[doc = " Use iJIT_Method_Load as event data but"] -#[doc = " required fields are following:"] -#[doc = " - method_id identify the code to update."] -#[doc = " - method_load_address specify start address"] -#[doc = " within identified code range"] -#[doc = " where update should be started."] -#[doc = " - method_size specify length of updated code"] -#[doc = " range."] +#[doc = "<\\brief Send to provide new content for\n a previously reported dynamic code.\n The previous content will be invalidated\n starting from the time of the notification.\n Use iJIT_Method_Load as event data but\n required fields are following:\n - method_id identify the code to update.\n - method_load_address specify start address\n within identified code range\n where update should be started.\n - method_size specify length of updated code\n range."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UPDATE: iJIT_jvm_event = 15; -#[doc = "<\\brief Send when an inline dynamic"] -#[doc = " code is JIT compiled and loaded"] -#[doc = " into memory by the JIT engine,"] -#[doc = " but before the parent code region"] -#[doc = " starts executing."] -#[doc = " Use iJIT_Method_Inline_Load as event data."] +#[doc = "<\\brief Send when an inline dynamic\n code is JIT compiled and loaded\n into memory by the JIT engine,\n but before the parent code region\n starts executing.\n Use iJIT_Method_Inline_Load as event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED: iJIT_jvm_event = 16; #[doc = " @cond exclude_from_documentation"] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UPDATE_V2: iJIT_jvm_event = 17; -#[doc = "<\\brief Send when a dynamic code is"] -#[doc = " JIT compiled and loaded into"] -#[doc = " memory by the JIT engine, but"] -#[doc = " before the code is executed."] -#[doc = " Use iJIT_Method_Load_V2 as event data."] +#[doc = "<\\brief Send when a dynamic code is\n JIT compiled and loaded into\n memory by the JIT engine, but\n before the code is executed.\n Use iJIT_Method_Load_V2 as event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2: iJIT_jvm_event = 21; -#[doc = "<\\brief Send when a dynamic code is"] -#[doc = " JIT compiled and loaded into"] -#[doc = " memory by the JIT engine, but"] -#[doc = " before the code is executed."] -#[doc = " Use iJIT_Method_Load_V3 as event data."] +#[doc = "<\\brief Send when a dynamic code is\n JIT compiled and loaded into\n memory by the JIT engine, but\n before the code is executed.\n Use iJIT_Method_Load_V3 as event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3: iJIT_jvm_event = 22; #[doc = " @brief Enumerator for the types of notifications"] pub type iJIT_jvm_event = ::std::os::raw::c_uint; #[doc = " @brief Enumerator for the types of notifications"] pub use self::iJIT_jvm_event as iJIT_JVM_EVENT; -#[doc = "<\\brief The agent is not running;"] -#[doc = " iJIT_NotifyEvent calls will"] -#[doc = " not be processed."] +#[doc = "<\\brief The agent is not running;\n iJIT_NotifyEvent calls will\n not be processed."] pub const _iJIT_IsProfilingActiveFlags_iJIT_NOTHING_RUNNING: _iJIT_IsProfilingActiveFlags = 0; -#[doc = "<\\brief The agent is running and"] -#[doc = " ready to process notifications."] +#[doc = "<\\brief The agent is running and\n ready to process notifications."] pub const _iJIT_IsProfilingActiveFlags_iJIT_SAMPLING_ON: _iJIT_IsProfilingActiveFlags = 1; #[doc = " @brief Enumerator for the agent's mode"] pub type _iJIT_IsProfilingActiveFlags = ::std::os::raw::c_uint; #[doc = " @brief Enumerator for the agent's mode"] pub use self::_iJIT_IsProfilingActiveFlags as iJIT_IsProfilingActiveFlags; -#[doc = " @brief Description of a single entry in the line number information of a code region."] -#[doc = " @details A table of line number entries gives information about how the reported code region"] -#[doc = " is mapped to source file."] -#[doc = " Intel(R) VTune(TM) Amplifier uses line number information to attribute"] -#[doc = " the samples (virtual address) to a line number. \\n"] -#[doc = " It is acceptable to report different code addresses for the same source line:"] -#[doc = " @code"] -#[doc = " Offset LineNumber"] -#[doc = " 1 2"] -#[doc = " 12 4"] -#[doc = " 15 2"] -#[doc = " 18 1"] -#[doc = " 21 30"] -#[doc = ""] -#[doc = " VTune Amplifier constructs the following table using the client data"] -#[doc = ""] -#[doc = " Code subrange Line number"] -#[doc = " 0-1 2"] -#[doc = " 1-12 4"] -#[doc = " 12-15 2"] -#[doc = " 15-18 1"] -#[doc = " 18-21 30"] -#[doc = " @endcode"] +#[doc = " @brief Description of a single entry in the line number information of a code region.\n @details A table of line number entries gives information about how the reported code region\n is mapped to source file.\n Intel(R) VTune(TM) Amplifier uses line number information to attribute\n the samples (virtual address) to a line number. \\n\n It is acceptable to report different code addresses for the same source line:\n @code\n Offset LineNumber\n 1 2\n 12 4\n 15 2\n 18 1\n 21 30\n\n VTune Amplifier constructs the following table using the client data\n\n Code subrange Line number\n 0-1 2\n 1-12 4\n 12-15 2\n 15-18 1\n 18-21 30\n @endcode"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _LineNumberInfo { @@ -96,6 +39,8 @@ pub struct _LineNumberInfo { } #[test] fn bindgen_test_layout__LineNumberInfo() { + const UNINIT: ::std::mem::MaybeUninit<_LineNumberInfo> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_LineNumberInfo>(), 8usize, @@ -107,7 +52,7 @@ fn bindgen_test_layout__LineNumberInfo() { concat!("Alignment of ", stringify!(_LineNumberInfo)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_LineNumberInfo>())).Offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -117,7 +62,7 @@ fn bindgen_test_layout__LineNumberInfo() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_LineNumberInfo>())).LineNumber as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).LineNumber) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -127,53 +72,9 @@ fn bindgen_test_layout__LineNumberInfo() { ) ); } -#[doc = " @brief Description of a single entry in the line number information of a code region."] -#[doc = " @details A table of line number entries gives information about how the reported code region"] -#[doc = " is mapped to source file."] -#[doc = " Intel(R) VTune(TM) Amplifier uses line number information to attribute"] -#[doc = " the samples (virtual address) to a line number. \\n"] -#[doc = " It is acceptable to report different code addresses for the same source line:"] -#[doc = " @code"] -#[doc = " Offset LineNumber"] -#[doc = " 1 2"] -#[doc = " 12 4"] -#[doc = " 15 2"] -#[doc = " 18 1"] -#[doc = " 21 30"] -#[doc = ""] -#[doc = " VTune Amplifier constructs the following table using the client data"] -#[doc = ""] -#[doc = " Code subrange Line number"] -#[doc = " 0-1 2"] -#[doc = " 1-12 4"] -#[doc = " 12-15 2"] -#[doc = " 15-18 1"] -#[doc = " 18-21 30"] -#[doc = " @endcode"] +#[doc = " @brief Description of a single entry in the line number information of a code region.\n @details A table of line number entries gives information about how the reported code region\n is mapped to source file.\n Intel(R) VTune(TM) Amplifier uses line number information to attribute\n the samples (virtual address) to a line number. \\n\n It is acceptable to report different code addresses for the same source line:\n @code\n Offset LineNumber\n 1 2\n 12 4\n 15 2\n 18 1\n 21 30\n\n VTune Amplifier constructs the following table using the client data\n\n Code subrange Line number\n 0-1 2\n 1-12 4\n 12-15 2\n 15-18 1\n 18-21 30\n @endcode"] pub type pLineNumberInfo = *mut _LineNumberInfo; -#[doc = " @brief Description of a single entry in the line number information of a code region."] -#[doc = " @details A table of line number entries gives information about how the reported code region"] -#[doc = " is mapped to source file."] -#[doc = " Intel(R) VTune(TM) Amplifier uses line number information to attribute"] -#[doc = " the samples (virtual address) to a line number. \\n"] -#[doc = " It is acceptable to report different code addresses for the same source line:"] -#[doc = " @code"] -#[doc = " Offset LineNumber"] -#[doc = " 1 2"] -#[doc = " 12 4"] -#[doc = " 15 2"] -#[doc = " 18 1"] -#[doc = " 21 30"] -#[doc = ""] -#[doc = " VTune Amplifier constructs the following table using the client data"] -#[doc = ""] -#[doc = " Code subrange Line number"] -#[doc = " 0-1 2"] -#[doc = " 1-12 4"] -#[doc = " 12-15 2"] -#[doc = " 15-18 1"] -#[doc = " 18-21 30"] -#[doc = " @endcode"] +#[doc = " @brief Description of a single entry in the line number information of a code region.\n @details A table of line number entries gives information about how the reported code region\n is mapped to source file.\n Intel(R) VTune(TM) Amplifier uses line number information to attribute\n the samples (virtual address) to a line number. \\n\n It is acceptable to report different code addresses for the same source line:\n @code\n Offset LineNumber\n 1 2\n 12 4\n 15 2\n 18 1\n 21 30\n\n VTune Amplifier constructs the following table using the client data\n\n Code subrange Line number\n 0-1 2\n 1-12 4\n 12-15 2\n 15-18 1\n 18-21 30\n @endcode"] pub type LineNumberInfo = _LineNumberInfo; #[doc = "<\\brief Native to the process architecture that is calling it."] pub const _iJIT_CodeArchitecture_iJIT_CA_NATIVE: _iJIT_CodeArchitecture = 0; @@ -185,43 +86,21 @@ pub const _iJIT_CodeArchitecture_iJIT_CA_64: _iJIT_CodeArchitecture = 2; pub type _iJIT_CodeArchitecture = ::std::os::raw::c_uint; #[doc = " @brief Enumerator for the code architecture."] pub use self::_iJIT_CodeArchitecture as iJIT_CodeArchitecture; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED\n as an event type to report it."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Load { - #[doc = "<\\brief Unique method ID. Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or else manage ID uniqueness"] - #[doc = " and correct range by yourself.\\n"] - #[doc = " You must use the same method ID for all code"] - #[doc = " regions of the same method, otherwise different"] - #[doc = " method IDs specify different methods."] + #[doc = "<\\brief Unique method ID. Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or else manage ID uniqueness\n and correct range by yourself.\\n\n You must use the same method ID for all code\n regions of the same method, otherwise different\n method IDs specify different methods."] pub method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief The name of the method. It can be optionally"] - #[doc = " prefixed with its class name and appended with"] - #[doc = " its complete signature. Can't be NULL."] + #[doc = "<\\brief The name of the method. It can be optionally\n prefixed with its class name and appended with\n its complete signature. Can't be NULL."] pub method_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief The start virtual address of the method code"] - #[doc = " region. If NULL, data provided with"] - #[doc = " event are not accepted."] + #[doc = "<\\brief The start virtual address of the method code\n region. If NULL, data provided with\n event are not accepted."] pub method_load_address: *mut ::std::os::raw::c_void, - #[doc = "<\\brief The code size of the method in memory."] - #[doc = " If 0, then data provided with the event are not"] - #[doc = " accepted."] + #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."] pub method_size: ::std::os::raw::c_uint, - #[doc = "<\\brief The number of entries in the line number"] - #[doc = " table.0 if none."] + #[doc = "<\\brief The number of entries in the line number\n table.0 if none."] pub line_number_size: ::std::os::raw::c_uint, - #[doc = "<\\brief Pointer to the line numbers info"] - #[doc = " array. Can be NULL if"] - #[doc = " line_number_size is 0. See"] - #[doc = " LineNumberInfo Structure for a"] - #[doc = " description of a single entry in"] - #[doc = " the line number info array"] + #[doc = "<\\brief Pointer to the line numbers info\n array. Can be NULL if\n line_number_size is 0. See\n LineNumberInfo Structure for a\n description of a single entry in\n the line number info array"] pub line_number_table: pLineNumberInfo, #[doc = "<\\brief This field is obsolete."] pub class_id: ::std::os::raw::c_uint, @@ -232,6 +111,8 @@ pub struct _iJIT_Method_Load { } #[test] fn bindgen_test_layout__iJIT_Method_Load() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Load> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Load>(), 64usize, @@ -243,7 +124,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { concat!("Alignment of ", stringify!(_iJIT_Method_Load)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -253,7 +134,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -263,9 +144,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_load_address as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -275,7 +154,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -285,9 +164,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).line_number_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -297,9 +174,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).line_number_table as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -309,7 +184,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).class_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).class_id) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -319,9 +194,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).class_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -331,9 +204,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).source_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -343,66 +214,37 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); } -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED\n as an event type to report it."] pub type piJIT_Method_Load = *mut _iJIT_Method_Load; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED\n as an event type to report it."] pub type iJIT_Method_Load = _iJIT_Method_Load; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load_V2 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load_V2 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2\n as an event type to report it."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Load_V2 { - #[doc = "<\\brief Unique method ID. Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or else manage ID uniqueness"] - #[doc = " and correct range by yourself.\\n"] - #[doc = " You must use the same method ID for all code"] - #[doc = " regions of the same method, otherwise different"] - #[doc = " method IDs specify different methods."] + #[doc = "<\\brief Unique method ID. Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or else manage ID uniqueness\n and correct range by yourself.\\n\n You must use the same method ID for all code\n regions of the same method, otherwise different\n method IDs specify different methods."] pub method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief The name of the method. It can be optionally"] - #[doc = " prefixed with its class name and appended with"] - #[doc = " its complete signature. Can't be NULL."] + #[doc = "<\\brief The name of the method. It can be optionally\n prefixed with its class name and appended with\n its complete signature. Can't be NULL."] pub method_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief The start virtual address of the method code"] - #[doc = " region. If NULL, then data provided with the"] - #[doc = " event are not accepted."] + #[doc = "<\\brief The start virtual address of the method code\n region. If NULL, then data provided with the\n event are not accepted."] pub method_load_address: *mut ::std::os::raw::c_void, - #[doc = "<\\brief The code size of the method in memory."] - #[doc = " If 0, then data provided with the event are not"] - #[doc = " accepted."] + #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."] pub method_size: ::std::os::raw::c_uint, - #[doc = "<\\brief The number of entries in the line number"] - #[doc = " table. 0 if none."] + #[doc = "<\\brief The number of entries in the line number\n table. 0 if none."] pub line_number_size: ::std::os::raw::c_uint, - #[doc = "<\\brief Pointer to the line numbers info"] - #[doc = " array. Can be NULL if"] - #[doc = " line_number_size is 0. See"] - #[doc = " LineNumberInfo Structure for a"] - #[doc = " description of a single entry in"] - #[doc = " the line number info array."] + #[doc = "<\\brief Pointer to the line numbers info\n array. Can be NULL if\n line_number_size is 0. See\n LineNumberInfo Structure for a\n description of a single entry in\n the line number info array."] pub line_number_table: pLineNumberInfo, #[doc = "<\\brief Class name. Can be NULL."] pub class_file_name: *mut ::std::os::raw::c_char, #[doc = "<\\brief Source file name. Can be NULL."] pub source_file_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief Module name. Can be NULL."] - #[doc = "The module name can be useful for distinguishing among"] - #[doc = "different JIT engines. VTune Amplifier will display"] - #[doc = "reported methods grouped by specific module."] + #[doc = "<\\brief Module name. Can be NULL.\nThe module name can be useful for distinguishing among\ndifferent JIT engines. VTune Amplifier will display\nreported methods grouped by specific module."] pub module_name: *mut ::std::os::raw::c_char, } #[test] fn bindgen_test_layout__iJIT_Method_Load_V2() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Load_V2> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Load_V2>(), 64usize, @@ -414,7 +256,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { concat!("Alignment of ", stringify!(_iJIT_Method_Load_V2)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -424,9 +266,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -436,10 +276,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_load_address as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -449,9 +286,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -461,9 +296,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).line_number_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -473,9 +306,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).line_number_table as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -485,9 +316,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).class_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -497,9 +326,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).source_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -509,9 +336,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).module_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_name) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -521,81 +346,39 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); } -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load_V2 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load_V2 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2\n as an event type to report it."] pub type piJIT_Method_Load_V2 = *mut _iJIT_Method_Load_V2; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load_V2 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load_V2 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2\n as an event type to report it."] pub type iJIT_Method_Load_V2 = _iJIT_Method_Load_V2; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2"] -#[doc = " with a newly introduced 'arch' field that specifies architecture of the code region."] -#[doc = " When you use the iJIT_Method_Load_V3 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2\n with a newly introduced 'arch' field that specifies architecture of the code region.\n When you use the iJIT_Method_Load_V3 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3\n as an event type to report it."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Load_V3 { - #[doc = "<\\brief Unique method ID. Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or manage ID uniqueness"] - #[doc = " and correct range by yourself.\\n"] - #[doc = " You must use the same method ID for all code"] - #[doc = " regions of the same method, otherwise they are"] - #[doc = " treated as regions of different methods."] + #[doc = "<\\brief Unique method ID. Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or manage ID uniqueness\n and correct range by yourself.\\n\n You must use the same method ID for all code\n regions of the same method, otherwise they are\n treated as regions of different methods."] pub method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief The name of the method. It can be optionally"] - #[doc = " prefixed with its class name and appended with"] - #[doc = " its complete signature. Cannot be NULL."] + #[doc = "<\\brief The name of the method. It can be optionally\n prefixed with its class name and appended with\n its complete signature. Cannot be NULL."] pub method_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief The start virtual address of the method code"] - #[doc = " region. If NULL, then data provided with the"] - #[doc = " event are not accepted."] + #[doc = "<\\brief The start virtual address of the method code\n region. If NULL, then data provided with the\n event are not accepted."] pub method_load_address: *mut ::std::os::raw::c_void, - #[doc = "<\\brief The code size of the method in memory."] - #[doc = " If 0, then data provided with the event are not"] - #[doc = " accepted."] + #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."] pub method_size: ::std::os::raw::c_uint, - #[doc = "<\\brief The number of entries in the line number"] - #[doc = " table. 0 if none."] + #[doc = "<\\brief The number of entries in the line number\n table. 0 if none."] pub line_number_size: ::std::os::raw::c_uint, - #[doc = "<\\brief Pointer to the line numbers info"] - #[doc = " array. Can be NULL if"] - #[doc = " line_number_size is 0. See"] - #[doc = " LineNumberInfo Structure for a"] - #[doc = " description of a single entry in"] - #[doc = " the line number info array."] + #[doc = "<\\brief Pointer to the line numbers info\n array. Can be NULL if\n line_number_size is 0. See\n LineNumberInfo Structure for a\n description of a single entry in\n the line number info array."] pub line_number_table: pLineNumberInfo, #[doc = "<\\brief Class name. Can be NULL."] pub class_file_name: *mut ::std::os::raw::c_char, #[doc = "<\\brief Source file name. Can be NULL."] pub source_file_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief Module name. Can be NULL."] - #[doc = " The module name can be useful for distinguishing among"] - #[doc = " different JIT engines. VTune Amplifier will display"] - #[doc = " reported methods grouped by specific module."] + #[doc = "<\\brief Module name. Can be NULL.\n The module name can be useful for distinguishing among\n different JIT engines. VTune Amplifier will display\n reported methods grouped by specific module."] pub module_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief Architecture of the method's code region."] - #[doc = " By default, it is the same as the process"] - #[doc = " architecture that is calling it."] - #[doc = " For example, you can use it if your 32-bit JIT"] - #[doc = " engine generates 64-bit code."] - #[doc = ""] - #[doc = " If JIT engine reports both 32-bit and 64-bit types"] - #[doc = " of methods then VTune Amplifier splits the methods"] - #[doc = " with the same module name but with different"] - #[doc = " architectures in two different modules. VTune Amplifier"] - #[doc = " modifies the original name provided with a 64-bit method"] - #[doc = " version by ending it with '(64)'"] + #[doc = "<\\brief Architecture of the method's code region.\n By default, it is the same as the process\n architecture that is calling it.\n For example, you can use it if your 32-bit JIT\n engine generates 64-bit code.\n\n If JIT engine reports both 32-bit and 64-bit types\n of methods then VTune Amplifier splits the methods\n with the same module name but with different\n architectures in two different modules. VTune Amplifier\n modifies the original name provided with a 64-bit method\n version by ending it with '(64)'"] pub module_arch: iJIT_CodeArchitecture, } #[test] fn bindgen_test_layout__iJIT_Method_Load_V3() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Load_V3> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Load_V3>(), 72usize, @@ -607,7 +390,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { concat!("Alignment of ", stringify!(_iJIT_Method_Load_V3)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -617,9 +400,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -629,10 +410,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_load_address as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -642,9 +420,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -654,9 +430,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).line_number_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -666,9 +440,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).line_number_table as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -678,9 +450,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).class_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -690,9 +460,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).source_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -702,9 +470,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).module_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_name) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -714,9 +480,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).module_arch as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_arch) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -726,58 +490,26 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); } -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2"] -#[doc = " with a newly introduced 'arch' field that specifies architecture of the code region."] -#[doc = " When you use the iJIT_Method_Load_V3 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2\n with a newly introduced 'arch' field that specifies architecture of the code region.\n When you use the iJIT_Method_Load_V3 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3\n as an event type to report it."] pub type piJIT_Method_Load_V3 = *mut _iJIT_Method_Load_V3; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2"] -#[doc = " with a newly introduced 'arch' field that specifies architecture of the code region."] -#[doc = " When you use the iJIT_Method_Load_V3 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2\n with a newly introduced 'arch' field that specifies architecture of the code region.\n When you use the iJIT_Method_Load_V3 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3\n as an event type to report it."] pub type iJIT_Method_Load_V3 = _iJIT_Method_Load_V3; -#[doc = " @brief Description of an inline JIT-compiled method"] -#[doc = " @details When you use the_iJIT_Method_Inline_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of an inline JIT-compiled method\n @details When you use the_iJIT_Method_Inline_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED\n as an event type to report it."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Inline_Load { - #[doc = "<\\brief Unique method ID. Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or else manage ID uniqueness"] - #[doc = " and correct range by yourself."] + #[doc = "<\\brief Unique method ID. Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or else manage ID uniqueness\n and correct range by yourself."] pub method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief Unique immediate parent's method ID."] - #[doc = " Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or else manage ID uniqueness"] - #[doc = " and correct range by yourself."] + #[doc = "<\\brief Unique immediate parent's method ID.\n Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or else manage ID uniqueness\n and correct range by yourself."] pub parent_method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief The name of the method. It can be optionally"] - #[doc = " prefixed with its class name and appended with"] - #[doc = " its complete signature. Can't be NULL."] + #[doc = "<\\brief The name of the method. It can be optionally\n prefixed with its class name and appended with\n its complete signature. Can't be NULL."] pub method_name: *mut ::std::os::raw::c_char, pub method_load_address: *mut ::std::os::raw::c_void, - #[doc = "<\\brief The code size of the method in memory."] - #[doc = " If 0, then data provided with the event are not"] - #[doc = " accepted."] + #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."] pub method_size: ::std::os::raw::c_uint, - #[doc = "<\\brief The number of entries in the line number"] - #[doc = " table. 0 if none."] + #[doc = "<\\brief The number of entries in the line number\n table. 0 if none."] pub line_number_size: ::std::os::raw::c_uint, - #[doc = "<\\brief Pointer to the line numbers info"] - #[doc = " array. Can be NULL if"] - #[doc = " line_number_size is 0. See"] - #[doc = " LineNumberInfo Structure for a"] - #[doc = " description of a single entry in"] - #[doc = " the line number info array"] + #[doc = "<\\brief Pointer to the line numbers info\n array. Can be NULL if\n line_number_size is 0. See\n LineNumberInfo Structure for a\n description of a single entry in\n the line number info array"] pub line_number_table: pLineNumberInfo, #[doc = "<\\brief Class name. Can be NULL."] pub class_file_name: *mut ::std::os::raw::c_char, @@ -786,6 +518,9 @@ pub struct _iJIT_Method_Inline_Load { } #[test] fn bindgen_test_layout__iJIT_Method_Inline_Load() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Inline_Load> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Inline_Load>(), 56usize, @@ -797,9 +532,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { concat!("Alignment of ", stringify!(_iJIT_Method_Inline_Load)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_id as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -809,10 +542,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).parent_method_id as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).parent_method_id) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -822,9 +552,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -834,10 +562,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_load_address as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -847,9 +572,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -859,10 +582,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).line_number_size as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -872,10 +592,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).line_number_table as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -885,10 +602,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).class_file_name as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -898,10 +612,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).source_file_name as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -911,77 +622,23 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); } -#[doc = " @brief Description of an inline JIT-compiled method"] -#[doc = " @details When you use the_iJIT_Method_Inline_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of an inline JIT-compiled method\n @details When you use the_iJIT_Method_Inline_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED\n as an event type to report it."] pub type piJIT_Method_Inline_Load = *mut _iJIT_Method_Inline_Load; -#[doc = " @brief Description of an inline JIT-compiled method"] -#[doc = " @details When you use the_iJIT_Method_Inline_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of an inline JIT-compiled method\n @details When you use the_iJIT_Method_Inline_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED\n as an event type to report it."] pub type iJIT_Method_Inline_Load = _iJIT_Method_Inline_Load; pub const _iJIT_SegmentType_iJIT_CT_UNKNOWN: _iJIT_SegmentType = 0; #[doc = "<\\brief Executable code."] pub const _iJIT_SegmentType_iJIT_CT_CODE: _iJIT_SegmentType = 1; -#[doc = "<\\brief Data (not executable code)."] -#[doc = " VTune Amplifier uses the format string"] -#[doc = " (see iJIT_Method_Update) to represent"] -#[doc = " this data in the VTune Amplifier GUI"] +#[doc = "<\\brief Data (not executable code).\n VTune Amplifier uses the format string\n (see iJIT_Method_Update) to represent\n this data in the VTune Amplifier GUI"] pub const _iJIT_SegmentType_iJIT_CT_DATA: _iJIT_SegmentType = 2; -#[doc = "<\\brief Use the previous markup for the trace."] -#[doc = " Can be used for the following"] -#[doc = " iJVM_EVENT_TYPE_METHOD_UPDATE_V2 events,"] -#[doc = " if the type of the previously reported segment"] -#[doc = " type is the same."] +#[doc = "<\\brief Use the previous markup for the trace.\n Can be used for the following\n iJVM_EVENT_TYPE_METHOD_UPDATE_V2 events,\n if the type of the previously reported segment\n type is the same."] pub const _iJIT_SegmentType_iJIT_CT_KEEP: _iJIT_SegmentType = 3; pub const _iJIT_SegmentType_iJIT_CT_EOF: _iJIT_SegmentType = 4; -#[doc = " @cond exclude_from_documentation */"] -#[doc = " @brief Description of a segment type"] -#[doc = " @details Use the segment type to specify a type of data supplied"] -#[doc = " with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to"] -#[doc = " a certain code trace."] +#[doc = " @cond exclude_from_documentation */\n/**\n @brief Description of a segment type\n @details Use the segment type to specify a type of data supplied\n with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to\n a certain code trace."] pub type _iJIT_SegmentType = ::std::os::raw::c_uint; -#[doc = " @cond exclude_from_documentation */"] -#[doc = " @brief Description of a segment type"] -#[doc = " @details Use the segment type to specify a type of data supplied"] -#[doc = " with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to"] -#[doc = " a certain code trace."] +#[doc = " @cond exclude_from_documentation */\n/**\n @brief Description of a segment type\n @details Use the segment type to specify a type of data supplied\n with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to\n a certain code trace."] pub use self::_iJIT_SegmentType as iJIT_SegmentType; -#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method"] -#[doc = " @details The JIT engine may generate the methods that are updated at runtime"] -#[doc = " partially by mixed (data + executable code) content. When you use the iJIT_Method_Update"] -#[doc = " structure to describe the update of the content within a JIT-compiled method,"] -#[doc = " use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it."] -#[doc = ""] -#[doc = " On the first Update event, VTune Amplifier copies the original code range reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and"] -#[doc = " adds the modified range to the original method. For next update events, VTune Amplifier"] -#[doc = " does the same but it uses the latest modified version of a code region for update."] -#[doc = " Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event."] -#[doc = " Notes:"] -#[doc = " - Multiple update events with different types for the same trace are allowed"] -#[doc = " but they must be reported for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [code] Ignored"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] -#[doc = " - The types of previously reported events can be changed but they must be reported"] -#[doc = " for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] +#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method\n @details The JIT engine may generate the methods that are updated at runtime\n partially by mixed (data + executable code) content. When you use the iJIT_Method_Update\n structure to describe the update of the content within a JIT-compiled method,\n use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it.\n\n On the first Update event, VTune Amplifier copies the original code range reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and\n adds the modified range to the original method. For next update events, VTune Amplifier\n does the same but it uses the latest modified version of a code region for update.\n Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event.\n Notes:\n - Multiple update events with different types for the same trace are allowed\n but they must be reported for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [code] Ignored\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode\n - The types of previously reported events can be changed but they must be reported\n for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Update { @@ -991,15 +648,13 @@ pub struct _iJIT_Method_Update { pub size: ::std::os::raw::c_uint, #[doc = "<\\brief Type of the update"] pub type_: iJIT_SegmentType, - #[doc = "<\\brief C string that contains a format string"] - #[doc = " that follows the same specifications as format in printf."] - #[doc = " The format string is used for iJIT_CT_CODE only"] - #[doc = " and cannot be NULL."] - #[doc = " Format can be changed on the fly."] + #[doc = "<\\brief C string that contains a format string\n that follows the same specifications as format in printf.\n The format string is used for iJIT_CT_CODE only\n and cannot be NULL.\n Format can be changed on the fly."] pub data_format: *const ::std::os::raw::c_char, } #[test] fn bindgen_test_layout__iJIT_Method_Update() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Update> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Update>(), 24usize, @@ -1011,9 +666,7 @@ fn bindgen_test_layout__iJIT_Method_Update() { concat!("Alignment of ", stringify!(_iJIT_Method_Update)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Update>())).load_address as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).load_address) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1023,7 +676,7 @@ fn bindgen_test_layout__iJIT_Method_Update() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Update>())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1033,7 +686,7 @@ fn bindgen_test_layout__iJIT_Method_Update() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Update>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -1043,7 +696,7 @@ fn bindgen_test_layout__iJIT_Method_Update() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Update>())).data_format as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data_format) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1053,106 +706,20 @@ fn bindgen_test_layout__iJIT_Method_Update() { ) ); } -#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method"] -#[doc = " @details The JIT engine may generate the methods that are updated at runtime"] -#[doc = " partially by mixed (data + executable code) content. When you use the iJIT_Method_Update"] -#[doc = " structure to describe the update of the content within a JIT-compiled method,"] -#[doc = " use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it."] -#[doc = ""] -#[doc = " On the first Update event, VTune Amplifier copies the original code range reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and"] -#[doc = " adds the modified range to the original method. For next update events, VTune Amplifier"] -#[doc = " does the same but it uses the latest modified version of a code region for update."] -#[doc = " Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event."] -#[doc = " Notes:"] -#[doc = " - Multiple update events with different types for the same trace are allowed"] -#[doc = " but they must be reported for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [code] Ignored"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] -#[doc = " - The types of previously reported events can be changed but they must be reported"] -#[doc = " for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] +#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method\n @details The JIT engine may generate the methods that are updated at runtime\n partially by mixed (data + executable code) content. When you use the iJIT_Method_Update\n structure to describe the update of the content within a JIT-compiled method,\n use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it.\n\n On the first Update event, VTune Amplifier copies the original code range reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and\n adds the modified range to the original method. For next update events, VTune Amplifier\n does the same but it uses the latest modified version of a code region for update.\n Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event.\n Notes:\n - Multiple update events with different types for the same trace are allowed\n but they must be reported for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [code] Ignored\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode\n - The types of previously reported events can be changed but they must be reported\n for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode"] pub type piJIT_Method_Update = *mut _iJIT_Method_Update; -#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method"] -#[doc = " @details The JIT engine may generate the methods that are updated at runtime"] -#[doc = " partially by mixed (data + executable code) content. When you use the iJIT_Method_Update"] -#[doc = " structure to describe the update of the content within a JIT-compiled method,"] -#[doc = " use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it."] -#[doc = ""] -#[doc = " On the first Update event, VTune Amplifier copies the original code range reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and"] -#[doc = " adds the modified range to the original method. For next update events, VTune Amplifier"] -#[doc = " does the same but it uses the latest modified version of a code region for update."] -#[doc = " Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event."] -#[doc = " Notes:"] -#[doc = " - Multiple update events with different types for the same trace are allowed"] -#[doc = " but they must be reported for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [code] Ignored"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] -#[doc = " - The types of previously reported events can be changed but they must be reported"] -#[doc = " for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] +#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method\n @details The JIT engine may generate the methods that are updated at runtime\n partially by mixed (data + executable code) content. When you use the iJIT_Method_Update\n structure to describe the update of the content within a JIT-compiled method,\n use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it.\n\n On the first Update event, VTune Amplifier copies the original code range reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and\n adds the modified range to the original method. For next update events, VTune Amplifier\n does the same but it uses the latest modified version of a code region for update.\n Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event.\n Notes:\n - Multiple update events with different types for the same trace are allowed\n but they must be reported for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [code] Ignored\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode\n - The types of previously reported events can be changed but they must be reported\n for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode"] pub type iJIT_Method_Update = _iJIT_Method_Update; extern "C" { - #[doc = " @brief Generates a new unique method ID."] - #[doc = ""] - #[doc = " You must use this API to obtain unique and valid method IDs for methods or"] - #[doc = " traces reported to the agent if you don't have your own mechanism to generate"] - #[doc = " unique method IDs."] - #[doc = ""] - #[doc = " @return a new unique method ID. When out of unique method IDs, this API"] - #[doc = " returns 0, which is not an accepted value."] + #[doc = " @brief Generates a new unique method ID.\n\n You must use this API to obtain unique and valid method IDs for methods or\n traces reported to the agent if you don't have your own mechanism to generate\n unique method IDs.\n\n @return a new unique method ID. When out of unique method IDs, this API\n returns 0, which is not an accepted value."] pub fn iJIT_GetNewMethodID() -> ::std::os::raw::c_uint; } extern "C" { - #[doc = " @brief Returns the current mode of the agent."] - #[doc = ""] - #[doc = " @return iJIT_SAMPLING_ON, indicating that agent is running, or"] - #[doc = " iJIT_NOTHING_RUNNING if no agent is running."] + #[doc = " @brief Returns the current mode of the agent.\n\n @return iJIT_SAMPLING_ON, indicating that agent is running, or\n iJIT_NOTHING_RUNNING if no agent is running."] pub fn iJIT_IsProfilingActive() -> iJIT_IsProfilingActiveFlags; } extern "C" { - #[doc = " @brief Reports infomation about JIT-compiled code to the agent."] - #[doc = ""] - #[doc = " The reported information is used to attribute samples obtained from any"] - #[doc = " Intel(R) VTune(TM) Amplifier collector. This API needs to be called"] - #[doc = " after JIT compilation and before the first entry into the JIT-compiled"] - #[doc = " code."] - #[doc = ""] - #[doc = " @param[in] event_type - type of the data sent to the agent"] - #[doc = " @param[in] EventSpecificData - pointer to event-specific data"] - #[doc = ""] - #[doc = " @returns 1 on success, otherwise 0."] + #[doc = " @brief Reports infomation about JIT-compiled code to the agent.\n\n The reported information is used to attribute samples obtained from any\n Intel(R) VTune(TM) Amplifier collector. This API needs to be called\n after JIT compilation and before the first entry into the JIT-compiled\n code.\n\n @param[in] event_type - type of the data sent to the agent\n @param[in] EventSpecificData - pointer to event-specific data\n\n @returns 1 on success, otherwise 0."] pub fn iJIT_NotifyEvent( event_type: iJIT_JVM_EVENT, EventSpecificData: *mut ::std::os::raw::c_void, diff --git a/rust/ittapi-sys/src/windows/ittnotify_bindings.rs b/rust/ittapi-sys/src/windows/ittnotify_bindings.rs index 3109c92..be4c19f 100644 --- a/rust/ittapi-sys/src/windows/ittnotify_bindings.rs +++ b/rust/ittapi-sys/src/windows/ittnotify_bindings.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.59.2 */ +/* automatically generated by rust-bindgen 0.68.1 */ pub const ITT_OS_WIN: u32 = 1; pub const ITT_OS_LINUX: u32 = 2; @@ -24,13 +24,11 @@ pub const __itt_heap_growth: u32 = 2; pub const __itt_section_exec: u32 = 536870912; pub const __itt_section_read: u32 = 1073741824; pub const __itt_section_write: u32 = 2147483648; -pub type size_t = ::std::os::raw::c_ulonglong; pub type wchar_t = ::std::os::raw::c_ushort; pub const __itt_collection_scope___itt_collection_scope_host: __itt_collection_scope = 1; pub const __itt_collection_scope___itt_collection_scope_offload: __itt_collection_scope = 2; pub const __itt_collection_scope___itt_collection_scope_all: __itt_collection_scope = 2147483647; -#[doc = " @enum __itt_collection_scope"] -#[doc = " @brief Enumerator for collection scopes"] +#[doc = " @enum __itt_collection_scope\n @brief Enumerator for collection scopes"] pub type __itt_collection_scope = ::std::os::raw::c_int; pub type __itt_pause_ptr__3_0_t = ::std::option::Option; extern "C" { @@ -54,13 +52,7 @@ pub type __itt_detach_ptr__3_0_t = ::std::option::Option extern "C" { pub static mut __itt_detach_ptr__3_0: __itt_detach_ptr__3_0_t; } -#[doc = " @defgroup Intel Processor Trace control"] -#[doc = " API from this group provides control over collection and analysis of Intel Processor Trace (Intel PT) data"] -#[doc = " Information about Intel Processor Trace technology can be found here (Volume 3 chapter 35):"] -#[doc = " https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf"] -#[doc = " Use this API to mark particular code regions for loading detailed performance statistics."] -#[doc = " This mode makes your analysis faster and more accurate."] -#[doc = " @{"] +#[doc = " @defgroup Intel Processor Trace control\n API from this group provides control over collection and analysis of Intel Processor Trace (Intel PT) data\n Information about Intel Processor Trace technology can be found here (Volume 3 chapter 35):\n https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf\n Use this API to mark particular code regions for loading detailed performance statistics.\n This mode makes your analysis faster and more accurate.\n @{"] pub type __itt_pt_region = ::std::os::raw::c_uchar; pub type __itt_pt_region_createA_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn(name: *const ::std::os::raw::c_char) -> __itt_pt_region, @@ -98,18 +90,16 @@ extern "C" { } pub const __itt_suppress_mode___itt_unsuppress_range: __itt_suppress_mode = 0; pub const __itt_suppress_mode___itt_suppress_range: __itt_suppress_mode = 1; -#[doc = " @enum __itt_suppress_mode"] -#[doc = " @brief Enumerator for the suppressing modes"] +#[doc = " @enum __itt_suppress_mode\n @brief Enumerator for the suppressing modes"] pub type __itt_suppress_mode = ::std::os::raw::c_int; -#[doc = " @enum __itt_suppress_mode"] -#[doc = " @brief Enumerator for the suppressing modes"] +#[doc = " @enum __itt_suppress_mode\n @brief Enumerator for the suppressing modes"] pub use self::__itt_suppress_mode as __itt_suppress_mode_t; pub type __itt_suppress_mark_range_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( mode: __itt_suppress_mode_t, mask: ::std::os::raw::c_uint, address: *mut ::std::os::raw::c_void, - size: size_t, + size: usize, ), >; extern "C" { @@ -120,7 +110,7 @@ pub type __itt_suppress_clear_range_ptr__3_0_t = ::std::option::Option< mode: __itt_suppress_mode_t, mask: ::std::os::raw::c_uint, address: *mut ::std::os::raw::c_void, - size: size_t, + size: usize, ), >; extern "C" { @@ -211,8 +201,7 @@ pub type __itt_model_task = *mut ::std::os::raw::c_void; pub type __itt_model_task_instance = *mut ::std::os::raw::c_void; pub const __itt_model_disable___itt_model_disable_observation: __itt_model_disable = 0; pub const __itt_model_disable___itt_model_disable_collection: __itt_model_disable = 1; -#[doc = " @enum __itt_model_disable"] -#[doc = " @brief Enumerator for the disable methods"] +#[doc = " @enum __itt_model_disable\n @brief Enumerator for the disable methods"] pub type __itt_model_disable = ::std::os::raw::c_int; pub type __itt_model_site_begin_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -235,7 +224,7 @@ extern "C" { pub static mut __itt_model_site_beginA_ptr__3_0: __itt_model_site_beginA_ptr__3_0_t; } pub type __itt_model_site_beginAL_ptr__3_0_t = ::std::option::Option< - unsafe extern "C" fn(name: *const ::std::os::raw::c_char, siteNameLen: size_t), + unsafe extern "C" fn(name: *const ::std::os::raw::c_char, siteNameLen: usize), >; extern "C" { pub static mut __itt_model_site_beginAL_ptr__3_0: __itt_model_site_beginAL_ptr__3_0_t; @@ -276,7 +265,7 @@ extern "C" { pub static mut __itt_model_task_beginA_ptr__3_0: __itt_model_task_beginA_ptr__3_0_t; } pub type __itt_model_task_beginAL_ptr__3_0_t = ::std::option::Option< - unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: size_t), + unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: usize), >; extern "C" { pub static mut __itt_model_task_beginAL_ptr__3_0: __itt_model_task_beginAL_ptr__3_0_t; @@ -287,7 +276,7 @@ extern "C" { pub static mut __itt_model_iteration_taskA_ptr__3_0: __itt_model_iteration_taskA_ptr__3_0_t; } pub type __itt_model_iteration_taskAL_ptr__3_0_t = ::std::option::Option< - unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: size_t), + unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: usize), >; extern "C" { pub static mut __itt_model_iteration_taskAL_ptr__3_0: __itt_model_iteration_taskAL_ptr__3_0_t; @@ -323,7 +312,7 @@ extern "C" { pub static mut __itt_model_lock_release_2_ptr__3_0: __itt_model_lock_release_2_ptr__3_0_t; } pub type __itt_model_record_allocation_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_record_allocation_ptr__3_0: __itt_model_record_allocation_ptr__3_0_t; } @@ -334,17 +323,17 @@ extern "C" { __itt_model_record_deallocation_ptr__3_0_t; } pub type __itt_model_induction_uses_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_induction_uses_ptr__3_0: __itt_model_induction_uses_ptr__3_0_t; } pub type __itt_model_reduction_uses_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_reduction_uses_ptr__3_0: __itt_model_reduction_uses_ptr__3_0_t; } pub type __itt_model_observe_uses_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_observe_uses_ptr__3_0: __itt_model_observe_uses_ptr__3_0_t; } @@ -363,14 +352,11 @@ extern "C" { pub static mut __itt_model_disable_pop_ptr__3_0: __itt_model_disable_pop_ptr__3_0_t; } pub type __itt_model_aggregate_task_ptr__3_0_t = - ::std::option::Option; + ::std::option::Option; extern "C" { pub static mut __itt_model_aggregate_task_ptr__3_0: __itt_model_aggregate_task_ptr__3_0_t; } -#[doc = " @defgroup heap Heap"] -#[doc = " @ingroup public"] -#[doc = " Heap group"] -#[doc = " @{"] +#[doc = " @defgroup heap Heap\n @ingroup public\n Heap group\n @{"] pub type __itt_heap_function = *mut ::std::os::raw::c_void; pub type __itt_heap_function_createA_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -388,7 +374,7 @@ extern "C" { pub static mut __itt_heap_function_createW_ptr__3_0: __itt_heap_function_createW_ptr__3_0_t; } pub type __itt_heap_allocate_begin_ptr__3_0_t = ::std::option::Option< - unsafe extern "C" fn(h: __itt_heap_function, size: size_t, initialized: ::std::os::raw::c_int), + unsafe extern "C" fn(h: __itt_heap_function, size: usize, initialized: ::std::os::raw::c_int), >; extern "C" { pub static mut __itt_heap_allocate_begin_ptr__3_0: __itt_heap_allocate_begin_ptr__3_0_t; @@ -397,7 +383,7 @@ pub type __itt_heap_allocate_end_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( h: __itt_heap_function, addr: *mut *mut ::std::os::raw::c_void, - size: size_t, + size: usize, initialized: ::std::os::raw::c_int, ), >; @@ -420,7 +406,7 @@ pub type __itt_heap_reallocate_begin_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( h: __itt_heap_function, addr: *mut ::std::os::raw::c_void, - new_size: size_t, + new_size: usize, initialized: ::std::os::raw::c_int, ), >; @@ -432,7 +418,7 @@ pub type __itt_heap_reallocate_end_ptr__3_0_t = ::std::option::Option< h: __itt_heap_function, addr: *mut ::std::os::raw::c_void, new_addr: *mut *mut ::std::os::raw::c_void, - new_size: size_t, + new_size: usize, initialized: ::std::os::raw::c_int, ), >; @@ -488,6 +474,8 @@ pub struct ___itt_domain { } #[test] fn bindgen_test_layout____itt_domain() { + const UNINIT: ::std::mem::MaybeUninit<___itt_domain> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_domain>(), 48usize, @@ -499,7 +487,7 @@ fn bindgen_test_layout____itt_domain() { concat!("Alignment of ", stringify!(___itt_domain)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -509,7 +497,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).nameA as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameA) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -519,7 +507,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).nameW as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameW) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -529,7 +517,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -539,7 +527,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -549,7 +537,7 @@ fn bindgen_test_layout____itt_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_domain>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -580,6 +568,8 @@ pub struct ___itt_id { } #[test] fn bindgen_test_layout____itt_id() { + const UNINIT: ::std::mem::MaybeUninit<___itt_id> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_id>(), 24usize, @@ -591,7 +581,7 @@ fn bindgen_test_layout____itt_id() { concat!("Alignment of ", stringify!(___itt_id)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_id>())).d1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).d1) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -601,7 +591,7 @@ fn bindgen_test_layout____itt_id() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_id>())).d2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).d2) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -611,7 +601,7 @@ fn bindgen_test_layout____itt_id() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_id>())).d3 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).d3) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -650,6 +640,8 @@ pub struct ___itt_string_handle { } #[test] fn bindgen_test_layout____itt_string_handle() { + const UNINIT: ::std::mem::MaybeUninit<___itt_string_handle> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_string_handle>(), 40usize, @@ -661,7 +653,7 @@ fn bindgen_test_layout____itt_string_handle() { concat!("Alignment of ", stringify!(___itt_string_handle)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).strA as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).strA) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -671,7 +663,7 @@ fn bindgen_test_layout____itt_string_handle() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).strW as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).strW) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -681,7 +673,7 @@ fn bindgen_test_layout____itt_string_handle() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -691,7 +683,7 @@ fn bindgen_test_layout____itt_string_handle() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -701,7 +693,7 @@ fn bindgen_test_layout____itt_string_handle() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -857,8 +849,7 @@ pub const __itt_metadata_type___itt_metadata_s16: __itt_metadata_type = 6; pub const __itt_metadata_type___itt_metadata_float: __itt_metadata_type = 7; #[doc = "< SIgned 64-bit floating-point"] pub const __itt_metadata_type___itt_metadata_double: __itt_metadata_type = 8; -#[doc = " @ingroup parameters"] -#[doc = " @brief describes the type of metadata"] +#[doc = " @ingroup parameters\n @brief describes the type of metadata"] pub type __itt_metadata_type = ::std::os::raw::c_int; pub type __itt_metadata_add_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -866,7 +857,7 @@ pub type __itt_metadata_add_ptr__3_0_t = ::std::option::Option< id: __itt_id, key: *mut __itt_string_handle, type_: __itt_metadata_type, - count: size_t, + count: usize, data: *mut ::std::os::raw::c_void, ), >; @@ -879,7 +870,7 @@ pub type __itt_metadata_str_addA_ptr__3_0_t = ::std::option::Option< id: __itt_id, key: *mut __itt_string_handle, data: *const ::std::os::raw::c_char, - length: size_t, + length: usize, ), >; extern "C" { @@ -891,7 +882,7 @@ pub type __itt_metadata_str_addW_ptr__3_0_t = ::std::option::Option< id: __itt_id, key: *mut __itt_string_handle, data: *const wchar_t, - length: size_t, + length: usize, ), >; extern "C" { @@ -903,7 +894,7 @@ pub type __itt_metadata_add_with_scope_ptr__3_0_t = ::std::option::Option< scope: __itt_scope, key: *mut __itt_string_handle, type_: __itt_metadata_type, - count: size_t, + count: usize, data: *mut ::std::os::raw::c_void, ), >; @@ -916,7 +907,7 @@ pub type __itt_metadata_str_add_with_scopeA_ptr__3_0_t = ::std::option::Option< scope: __itt_scope, key: *mut __itt_string_handle, data: *const ::std::os::raw::c_char, - length: size_t, + length: usize, ), >; extern "C" { @@ -929,7 +920,7 @@ pub type __itt_metadata_str_add_with_scopeW_ptr__3_0_t = ::std::option::Option< scope: __itt_scope, key: *mut __itt_string_handle, data: *const wchar_t, - length: size_t, + length: usize, ), >; extern "C" { @@ -951,13 +942,7 @@ pub const __itt_relation___itt_relation_is_child_of: __itt_relation = 5; pub const __itt_relation___itt_relation_is_continued_by: __itt_relation = 6; #[doc = "< \"A is predecessor to B\" means that B cannot start until A completes (inverse of is_dependent_on)"] pub const __itt_relation___itt_relation_is_predecessor_to: __itt_relation = 7; -#[doc = " @ingroup relations"] -#[doc = " @brief The kind of relation between two instances is specified by the enumerated type __itt_relation."] -#[doc = " Relations between instances can be added with an API call. The relation"] -#[doc = " API uses instance IDs. Relations can be added before or after the actual"] -#[doc = " instances are created and persist independently of the instances. This"] -#[doc = " is the motivation for having different lifetimes for instance IDs and"] -#[doc = " the actual instances."] +#[doc = " @ingroup relations\n @brief The kind of relation between two instances is specified by the enumerated type __itt_relation.\n Relations between instances can be added with an API call. The relation\n API uses instance IDs. Relations can be added before or after the actual\n instances are created and persist independently of the instances. This\n is the motivation for having different lifetimes for instance IDs and\n the actual instances."] pub type __itt_relation = ::std::os::raw::c_int; pub type __itt_relation_add_to_current_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn(domain: *const __itt_domain, relation: __itt_relation, tail: __itt_id), @@ -986,6 +971,8 @@ pub struct ___itt_clock_info { } #[test] fn bindgen_test_layout____itt_clock_info() { + const UNINIT: ::std::mem::MaybeUninit<___itt_clock_info> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_clock_info>(), 16usize, @@ -997,7 +984,7 @@ fn bindgen_test_layout____itt_clock_info() { concat!("Alignment of ", stringify!(___itt_clock_info)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_info>())).clock_freq as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clock_freq) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1007,7 +994,7 @@ fn bindgen_test_layout____itt_clock_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_info>())).clock_base as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clock_base) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1039,6 +1026,8 @@ pub struct ___itt_clock_domain { } #[test] fn bindgen_test_layout____itt_clock_domain() { + const UNINIT: ::std::mem::MaybeUninit<___itt_clock_domain> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_clock_domain>(), 56usize, @@ -1050,7 +1039,7 @@ fn bindgen_test_layout____itt_clock_domain() { concat!("Alignment of ", stringify!(___itt_clock_domain)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).info as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).info) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1060,7 +1049,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).fn_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1070,7 +1059,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).fn_data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fn_data) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1080,7 +1069,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1090,7 +1079,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1100,7 +1089,7 @@ fn bindgen_test_layout____itt_clock_domain() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -1187,7 +1176,7 @@ extern "C" { pub struct ___itt_counter { _unused: [u8; 0], } -#[doc = " @brief opaque structure for counter identification"] +#[doc = " @brief opaque structure for counter identification\n/\n/** @cond exclude_from_documentation"] pub type __itt_counter = *mut ___itt_counter; pub type __itt_counter_createA_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -1361,6 +1350,8 @@ pub struct ___itt_track_group { } #[test] fn bindgen_test_layout____itt_track_group() { + const UNINIT: ::std::mem::MaybeUninit<___itt_track_group> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_track_group>(), 40usize, @@ -1372,7 +1363,7 @@ fn bindgen_test_layout____itt_track_group() { concat!("Alignment of ", stringify!(___itt_track_group)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1382,7 +1373,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).track as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).track) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1392,7 +1383,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).tgtype as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tgtype) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1402,7 +1393,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -1412,7 +1403,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1422,7 +1413,7 @@ fn bindgen_test_layout____itt_track_group() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track_group>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1434,11 +1425,9 @@ fn bindgen_test_layout____itt_track_group() { } pub type __itt_track_group = ___itt_track_group; pub const ___itt_track_type___itt_track_type_normal: ___itt_track_type = 0; -#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track"] -#[doc = " is the only available track type."] +#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track\n is the only available track type."] pub type ___itt_track_type = ::std::os::raw::c_int; -#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track"] -#[doc = " is the only available track type."] +#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track\n is the only available track type."] pub use self::___itt_track_type as __itt_track_type; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1457,6 +1446,8 @@ pub struct ___itt_track { } #[test] fn bindgen_test_layout____itt_track() { + const UNINIT: ::std::mem::MaybeUninit<___itt_track> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_track>(), 40usize, @@ -1468,7 +1459,7 @@ fn bindgen_test_layout____itt_track() { concat!("Alignment of ", stringify!(___itt_track)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1478,7 +1469,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).group as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1488,7 +1479,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).ttype as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ttype) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1498,7 +1489,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -1508,7 +1499,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1518,7 +1509,7 @@ fn bindgen_test_layout____itt_track() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_track>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1553,11 +1544,7 @@ pub type __itt_set_track_ptr__3_0_t = extern "C" { pub static mut __itt_set_track_ptr__3_0: __itt_set_track_ptr__3_0_t; } -#[doc = " @cond exclude_from_gpa_documentation */"] -#[doc = " @defgroup events Events"] -#[doc = " @ingroup public"] -#[doc = " Events group"] -#[doc = " @{"] +#[doc = " @cond exclude_from_gpa_documentation */\n/**\n @defgroup events Events\n @ingroup public\n Events group\n @{\n/\n/** @brief user event type"] pub type __itt_event = ::std::os::raw::c_int; pub type __itt_event_createA_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( @@ -1657,18 +1644,19 @@ pub struct ___itt_section_info { pub name: *const ::std::os::raw::c_char, #[doc = "< Section content and semantics description"] pub type_: __itt_section_type, - #[doc = "< Section bit flags that describe attributes using bit mask"] - #[doc = " Zero if disabled, non-zero if enabled"] - pub flags: size_t, + #[doc = "< Section bit flags that describe attributes using bit mask\n Zero if disabled, non-zero if enabled"] + pub flags: usize, #[doc = "< Section load(relocated) start address"] pub start_addr: *mut ::std::os::raw::c_void, #[doc = "< Section file offset"] - pub size: size_t, + pub size: usize, #[doc = "< Section size"] - pub file_offset: size_t, + pub file_offset: usize, } #[test] fn bindgen_test_layout____itt_section_info() { + const UNINIT: ::std::mem::MaybeUninit<___itt_section_info> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_section_info>(), 48usize, @@ -1680,7 +1668,7 @@ fn bindgen_test_layout____itt_section_info() { concat!("Alignment of ", stringify!(___itt_section_info)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1690,7 +1678,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1700,7 +1688,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1710,7 +1698,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).start_addr as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).start_addr) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1720,7 +1708,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1730,7 +1718,7 @@ fn bindgen_test_layout____itt_section_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_section_info>())).file_offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).file_offset) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1750,24 +1738,20 @@ pub struct ___itt_module_object { pub module_id: __itt_id, #[doc = "< Binary module format"] pub module_type: __itt_module_type, - #[doc = "< Unique module name or path to module in UTF8"] - #[doc = " Contains module name when module_bufer and module_size exist"] - #[doc = " Contains module path when module_bufer and module_size absent"] - #[doc = " module_name remains the same for the certain module_id"] + #[doc = "< Unique module name or path to module in UTF8\n Contains module name when module_bufer and module_size exist\n Contains module path when module_bufer and module_size absent\n module_name remains the same for the certain module_id"] pub module_name: *const ::std::os::raw::c_char, #[doc = "< Module buffer content"] pub module_buffer: *mut ::std::os::raw::c_void, - #[doc = "< Module buffer size */"] - #[doc = " If module_buffer and module_size do not exist,"] - #[doc = " the binary module exists on the system already."] - #[doc = " The module_name parameter contains the path to the module."] - pub module_size: size_t, + #[doc = "< Module buffer size */\n/*!< If module_buffer and module_size exist, the binary module is dumped onto the system.\n If module_buffer and module_size do not exist,\n the binary module exists on the system already.\n The module_name parameter contains the path to the module."] + pub module_size: usize, #[doc = "< Reference to section information"] pub section_array: *mut __itt_section_info, - pub section_number: size_t, + pub section_number: usize, } #[test] fn bindgen_test_layout____itt_module_object() { + const UNINIT: ::std::mem::MaybeUninit<___itt_module_object> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_module_object>(), 80usize, @@ -1779,7 +1763,7 @@ fn bindgen_test_layout____itt_module_object() { concat!("Alignment of ", stringify!(___itt_module_object)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_module_object>())).version as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1789,7 +1773,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_module_object>())).module_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).module_id) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1799,9 +1783,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).module_type as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_type) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1811,9 +1793,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).module_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_name) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1823,9 +1803,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).module_buffer as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_buffer) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -1835,9 +1813,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).module_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_size) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -1847,9 +1823,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).section_array as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).section_array) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -1859,9 +1833,7 @@ fn bindgen_test_layout____itt_module_object() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<___itt_module_object>())).section_number as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).section_number) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -1904,6 +1876,8 @@ pub struct ___itt_histogram { } #[test] fn bindgen_test_layout____itt_histogram() { + const UNINIT: ::std::mem::MaybeUninit<___itt_histogram> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_histogram>(), 56usize, @@ -1915,7 +1889,7 @@ fn bindgen_test_layout____itt_histogram() { concat!("Alignment of ", stringify!(___itt_histogram)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).domain as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).domain) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1925,7 +1899,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).nameA as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameA) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1935,7 +1909,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).nameW as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nameW) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1945,7 +1919,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).x_type as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).x_type) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1955,7 +1929,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).y_type as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).y_type) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -1965,7 +1939,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).extra1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra1) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1975,7 +1949,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).extra2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extra2) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -1985,7 +1959,7 @@ fn bindgen_test_layout____itt_histogram() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_histogram>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -2021,7 +1995,7 @@ extern "C" { pub type __itt_histogram_submit_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( hist: *mut __itt_histogram, - length: size_t, + length: usize, x_data: *mut ::std::os::raw::c_void, y_data: *mut ::std::os::raw::c_void, ), @@ -2103,6 +2077,9 @@ pub struct ___itt_context_metadata { } #[test] fn bindgen_test_layout____itt_context_metadata() { + const UNINIT: ::std::mem::MaybeUninit<___itt_context_metadata> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<___itt_context_metadata>(), 16usize, @@ -2114,7 +2091,7 @@ fn bindgen_test_layout____itt_context_metadata() { concat!("Alignment of ", stringify!(___itt_context_metadata)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_context_metadata>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2124,7 +2101,7 @@ fn bindgen_test_layout____itt_context_metadata() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<___itt_context_metadata>())).value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2138,7 +2115,7 @@ pub type __itt_context_metadata = ___itt_context_metadata; pub type __itt_bind_context_metadata_to_counter_ptr__3_0_t = ::std::option::Option< unsafe extern "C" fn( counter: __itt_counter, - length: size_t, + length: usize, metadata: *mut __itt_context_metadata, ), >; diff --git a/rust/ittapi-sys/src/windows/jitprofiling_bindings.rs b/rust/ittapi-sys/src/windows/jitprofiling_bindings.rs index 296f4ce..9243de7 100644 --- a/rust/ittapi-sys/src/windows/jitprofiling_bindings.rs +++ b/rust/ittapi-sys/src/windows/jitprofiling_bindings.rs @@ -1,91 +1,34 @@ -/* automatically generated by rust-bindgen 0.59.2 */ +/* automatically generated by rust-bindgen 0.68.1 */ -#[doc = "<\\brief Send this to shutdown the agent."] -#[doc = " Use NULL for event data."] +#[doc = "<\\brief Send this to shutdown the agent.\n Use NULL for event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_SHUTDOWN: iJIT_jvm_event = 2; -#[doc = "<\\brief Send when dynamic code is"] -#[doc = " JIT compiled and loaded into"] -#[doc = " memory by the JIT engine, but"] -#[doc = " before the code is executed."] -#[doc = " Use iJIT_Method_Load as event"] -#[doc = " data."] +#[doc = "<\\brief Send when dynamic code is\n JIT compiled and loaded into\n memory by the JIT engine, but\n before the code is executed.\n Use iJIT_Method_Load as event\n data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED: iJIT_jvm_event = 13; -#[doc = "<\\brief Send when compiled dynamic"] -#[doc = " code is being unloaded from memory."] -#[doc = " Use iJIT_Method_Load as event data."] +#[doc = "<\\brief Send when compiled dynamic\n code is being unloaded from memory.\n Use iJIT_Method_Load as event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UNLOAD_START: iJIT_jvm_event = 14; -#[doc = "<\\brief Send to provide new content for"] -#[doc = " a previously reported dynamic code."] -#[doc = " The previous content will be invalidated"] -#[doc = " starting from the time of the notification."] -#[doc = " Use iJIT_Method_Load as event data but"] -#[doc = " required fields are following:"] -#[doc = " - method_id identify the code to update."] -#[doc = " - method_load_address specify start address"] -#[doc = " within identified code range"] -#[doc = " where update should be started."] -#[doc = " - method_size specify length of updated code"] -#[doc = " range."] +#[doc = "<\\brief Send to provide new content for\n a previously reported dynamic code.\n The previous content will be invalidated\n starting from the time of the notification.\n Use iJIT_Method_Load as event data but\n required fields are following:\n - method_id identify the code to update.\n - method_load_address specify start address\n within identified code range\n where update should be started.\n - method_size specify length of updated code\n range."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UPDATE: iJIT_jvm_event = 15; -#[doc = "<\\brief Send when an inline dynamic"] -#[doc = " code is JIT compiled and loaded"] -#[doc = " into memory by the JIT engine,"] -#[doc = " but before the parent code region"] -#[doc = " starts executing."] -#[doc = " Use iJIT_Method_Inline_Load as event data."] +#[doc = "<\\brief Send when an inline dynamic\n code is JIT compiled and loaded\n into memory by the JIT engine,\n but before the parent code region\n starts executing.\n Use iJIT_Method_Inline_Load as event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED: iJIT_jvm_event = 16; #[doc = " @cond exclude_from_documentation"] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UPDATE_V2: iJIT_jvm_event = 17; -#[doc = "<\\brief Send when a dynamic code is"] -#[doc = " JIT compiled and loaded into"] -#[doc = " memory by the JIT engine, but"] -#[doc = " before the code is executed."] -#[doc = " Use iJIT_Method_Load_V2 as event data."] +#[doc = "<\\brief Send when a dynamic code is\n JIT compiled and loaded into\n memory by the JIT engine, but\n before the code is executed.\n Use iJIT_Method_Load_V2 as event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2: iJIT_jvm_event = 21; -#[doc = "<\\brief Send when a dynamic code is"] -#[doc = " JIT compiled and loaded into"] -#[doc = " memory by the JIT engine, but"] -#[doc = " before the code is executed."] -#[doc = " Use iJIT_Method_Load_V3 as event data."] +#[doc = "<\\brief Send when a dynamic code is\n JIT compiled and loaded into\n memory by the JIT engine, but\n before the code is executed.\n Use iJIT_Method_Load_V3 as event data."] pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3: iJIT_jvm_event = 22; #[doc = " @brief Enumerator for the types of notifications"] pub type iJIT_jvm_event = ::std::os::raw::c_int; #[doc = " @brief Enumerator for the types of notifications"] pub use self::iJIT_jvm_event as iJIT_JVM_EVENT; -#[doc = "<\\brief The agent is not running;"] -#[doc = " iJIT_NotifyEvent calls will"] -#[doc = " not be processed."] +#[doc = "<\\brief The agent is not running;\n iJIT_NotifyEvent calls will\n not be processed."] pub const _iJIT_IsProfilingActiveFlags_iJIT_NOTHING_RUNNING: _iJIT_IsProfilingActiveFlags = 0; -#[doc = "<\\brief The agent is running and"] -#[doc = " ready to process notifications."] +#[doc = "<\\brief The agent is running and\n ready to process notifications."] pub const _iJIT_IsProfilingActiveFlags_iJIT_SAMPLING_ON: _iJIT_IsProfilingActiveFlags = 1; #[doc = " @brief Enumerator for the agent's mode"] pub type _iJIT_IsProfilingActiveFlags = ::std::os::raw::c_int; #[doc = " @brief Enumerator for the agent's mode"] pub use self::_iJIT_IsProfilingActiveFlags as iJIT_IsProfilingActiveFlags; -#[doc = " @brief Description of a single entry in the line number information of a code region."] -#[doc = " @details A table of line number entries gives information about how the reported code region"] -#[doc = " is mapped to source file."] -#[doc = " Intel(R) VTune(TM) Amplifier uses line number information to attribute"] -#[doc = " the samples (virtual address) to a line number. \\n"] -#[doc = " It is acceptable to report different code addresses for the same source line:"] -#[doc = " @code"] -#[doc = " Offset LineNumber"] -#[doc = " 1 2"] -#[doc = " 12 4"] -#[doc = " 15 2"] -#[doc = " 18 1"] -#[doc = " 21 30"] -#[doc = ""] -#[doc = " VTune Amplifier constructs the following table using the client data"] -#[doc = ""] -#[doc = " Code subrange Line number"] -#[doc = " 0-1 2"] -#[doc = " 1-12 4"] -#[doc = " 12-15 2"] -#[doc = " 15-18 1"] -#[doc = " 18-21 30"] -#[doc = " @endcode"] +#[doc = " @brief Description of a single entry in the line number information of a code region.\n @details A table of line number entries gives information about how the reported code region\n is mapped to source file.\n Intel(R) VTune(TM) Amplifier uses line number information to attribute\n the samples (virtual address) to a line number. \\n\n It is acceptable to report different code addresses for the same source line:\n @code\n Offset LineNumber\n 1 2\n 12 4\n 15 2\n 18 1\n 21 30\n\n VTune Amplifier constructs the following table using the client data\n\n Code subrange Line number\n 0-1 2\n 1-12 4\n 12-15 2\n 15-18 1\n 18-21 30\n @endcode"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _LineNumberInfo { @@ -96,6 +39,8 @@ pub struct _LineNumberInfo { } #[test] fn bindgen_test_layout__LineNumberInfo() { + const UNINIT: ::std::mem::MaybeUninit<_LineNumberInfo> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_LineNumberInfo>(), 8usize, @@ -107,7 +52,7 @@ fn bindgen_test_layout__LineNumberInfo() { concat!("Alignment of ", stringify!(_LineNumberInfo)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_LineNumberInfo>())).Offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -117,7 +62,7 @@ fn bindgen_test_layout__LineNumberInfo() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_LineNumberInfo>())).LineNumber as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).LineNumber) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -127,53 +72,9 @@ fn bindgen_test_layout__LineNumberInfo() { ) ); } -#[doc = " @brief Description of a single entry in the line number information of a code region."] -#[doc = " @details A table of line number entries gives information about how the reported code region"] -#[doc = " is mapped to source file."] -#[doc = " Intel(R) VTune(TM) Amplifier uses line number information to attribute"] -#[doc = " the samples (virtual address) to a line number. \\n"] -#[doc = " It is acceptable to report different code addresses for the same source line:"] -#[doc = " @code"] -#[doc = " Offset LineNumber"] -#[doc = " 1 2"] -#[doc = " 12 4"] -#[doc = " 15 2"] -#[doc = " 18 1"] -#[doc = " 21 30"] -#[doc = ""] -#[doc = " VTune Amplifier constructs the following table using the client data"] -#[doc = ""] -#[doc = " Code subrange Line number"] -#[doc = " 0-1 2"] -#[doc = " 1-12 4"] -#[doc = " 12-15 2"] -#[doc = " 15-18 1"] -#[doc = " 18-21 30"] -#[doc = " @endcode"] +#[doc = " @brief Description of a single entry in the line number information of a code region.\n @details A table of line number entries gives information about how the reported code region\n is mapped to source file.\n Intel(R) VTune(TM) Amplifier uses line number information to attribute\n the samples (virtual address) to a line number. \\n\n It is acceptable to report different code addresses for the same source line:\n @code\n Offset LineNumber\n 1 2\n 12 4\n 15 2\n 18 1\n 21 30\n\n VTune Amplifier constructs the following table using the client data\n\n Code subrange Line number\n 0-1 2\n 1-12 4\n 12-15 2\n 15-18 1\n 18-21 30\n @endcode"] pub type pLineNumberInfo = *mut _LineNumberInfo; -#[doc = " @brief Description of a single entry in the line number information of a code region."] -#[doc = " @details A table of line number entries gives information about how the reported code region"] -#[doc = " is mapped to source file."] -#[doc = " Intel(R) VTune(TM) Amplifier uses line number information to attribute"] -#[doc = " the samples (virtual address) to a line number. \\n"] -#[doc = " It is acceptable to report different code addresses for the same source line:"] -#[doc = " @code"] -#[doc = " Offset LineNumber"] -#[doc = " 1 2"] -#[doc = " 12 4"] -#[doc = " 15 2"] -#[doc = " 18 1"] -#[doc = " 21 30"] -#[doc = ""] -#[doc = " VTune Amplifier constructs the following table using the client data"] -#[doc = ""] -#[doc = " Code subrange Line number"] -#[doc = " 0-1 2"] -#[doc = " 1-12 4"] -#[doc = " 12-15 2"] -#[doc = " 15-18 1"] -#[doc = " 18-21 30"] -#[doc = " @endcode"] +#[doc = " @brief Description of a single entry in the line number information of a code region.\n @details A table of line number entries gives information about how the reported code region\n is mapped to source file.\n Intel(R) VTune(TM) Amplifier uses line number information to attribute\n the samples (virtual address) to a line number. \\n\n It is acceptable to report different code addresses for the same source line:\n @code\n Offset LineNumber\n 1 2\n 12 4\n 15 2\n 18 1\n 21 30\n\n VTune Amplifier constructs the following table using the client data\n\n Code subrange Line number\n 0-1 2\n 1-12 4\n 12-15 2\n 15-18 1\n 18-21 30\n @endcode"] pub type LineNumberInfo = _LineNumberInfo; #[doc = "<\\brief Native to the process architecture that is calling it."] pub const _iJIT_CodeArchitecture_iJIT_CA_NATIVE: _iJIT_CodeArchitecture = 0; @@ -185,43 +86,21 @@ pub const _iJIT_CodeArchitecture_iJIT_CA_64: _iJIT_CodeArchitecture = 2; pub type _iJIT_CodeArchitecture = ::std::os::raw::c_int; #[doc = " @brief Enumerator for the code architecture."] pub use self::_iJIT_CodeArchitecture as iJIT_CodeArchitecture; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED\n as an event type to report it."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Load { - #[doc = "<\\brief Unique method ID. Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or else manage ID uniqueness"] - #[doc = " and correct range by yourself.\\n"] - #[doc = " You must use the same method ID for all code"] - #[doc = " regions of the same method, otherwise different"] - #[doc = " method IDs specify different methods."] + #[doc = "<\\brief Unique method ID. Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or else manage ID uniqueness\n and correct range by yourself.\\n\n You must use the same method ID for all code\n regions of the same method, otherwise different\n method IDs specify different methods."] pub method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief The name of the method. It can be optionally"] - #[doc = " prefixed with its class name and appended with"] - #[doc = " its complete signature. Can't be NULL."] + #[doc = "<\\brief The name of the method. It can be optionally\n prefixed with its class name and appended with\n its complete signature. Can't be NULL."] pub method_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief The start virtual address of the method code"] - #[doc = " region. If NULL, data provided with"] - #[doc = " event are not accepted."] + #[doc = "<\\brief The start virtual address of the method code\n region. If NULL, data provided with\n event are not accepted."] pub method_load_address: *mut ::std::os::raw::c_void, - #[doc = "<\\brief The code size of the method in memory."] - #[doc = " If 0, then data provided with the event are not"] - #[doc = " accepted."] + #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."] pub method_size: ::std::os::raw::c_uint, - #[doc = "<\\brief The number of entries in the line number"] - #[doc = " table.0 if none."] + #[doc = "<\\brief The number of entries in the line number\n table.0 if none."] pub line_number_size: ::std::os::raw::c_uint, - #[doc = "<\\brief Pointer to the line numbers info"] - #[doc = " array. Can be NULL if"] - #[doc = " line_number_size is 0. See"] - #[doc = " LineNumberInfo Structure for a"] - #[doc = " description of a single entry in"] - #[doc = " the line number info array"] + #[doc = "<\\brief Pointer to the line numbers info\n array. Can be NULL if\n line_number_size is 0. See\n LineNumberInfo Structure for a\n description of a single entry in\n the line number info array"] pub line_number_table: pLineNumberInfo, #[doc = "<\\brief This field is obsolete."] pub class_id: ::std::os::raw::c_uint, @@ -232,6 +111,8 @@ pub struct _iJIT_Method_Load { } #[test] fn bindgen_test_layout__iJIT_Method_Load() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Load> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Load>(), 64usize, @@ -243,7 +124,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { concat!("Alignment of ", stringify!(_iJIT_Method_Load)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -253,7 +134,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -263,9 +144,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_load_address as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -275,7 +154,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -285,9 +164,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).line_number_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -297,9 +174,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).line_number_table as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -309,7 +184,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).class_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).class_id) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -319,9 +194,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).class_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -331,9 +204,7 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load>())).source_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -343,66 +214,37 @@ fn bindgen_test_layout__iJIT_Method_Load() { ) ); } -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED\n as an event type to report it."] pub type piJIT_Method_Load = *mut _iJIT_Method_Load; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED\n as an event type to report it."] pub type iJIT_Method_Load = _iJIT_Method_Load; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load_V2 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load_V2 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2\n as an event type to report it."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Load_V2 { - #[doc = "<\\brief Unique method ID. Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or else manage ID uniqueness"] - #[doc = " and correct range by yourself.\\n"] - #[doc = " You must use the same method ID for all code"] - #[doc = " regions of the same method, otherwise different"] - #[doc = " method IDs specify different methods."] + #[doc = "<\\brief Unique method ID. Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or else manage ID uniqueness\n and correct range by yourself.\\n\n You must use the same method ID for all code\n regions of the same method, otherwise different\n method IDs specify different methods."] pub method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief The name of the method. It can be optionally"] - #[doc = " prefixed with its class name and appended with"] - #[doc = " its complete signature. Can't be NULL."] + #[doc = "<\\brief The name of the method. It can be optionally\n prefixed with its class name and appended with\n its complete signature. Can't be NULL."] pub method_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief The start virtual address of the method code"] - #[doc = " region. If NULL, then data provided with the"] - #[doc = " event are not accepted."] + #[doc = "<\\brief The start virtual address of the method code\n region. If NULL, then data provided with the\n event are not accepted."] pub method_load_address: *mut ::std::os::raw::c_void, - #[doc = "<\\brief The code size of the method in memory."] - #[doc = " If 0, then data provided with the event are not"] - #[doc = " accepted."] + #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."] pub method_size: ::std::os::raw::c_uint, - #[doc = "<\\brief The number of entries in the line number"] - #[doc = " table. 0 if none."] + #[doc = "<\\brief The number of entries in the line number\n table. 0 if none."] pub line_number_size: ::std::os::raw::c_uint, - #[doc = "<\\brief Pointer to the line numbers info"] - #[doc = " array. Can be NULL if"] - #[doc = " line_number_size is 0. See"] - #[doc = " LineNumberInfo Structure for a"] - #[doc = " description of a single entry in"] - #[doc = " the line number info array."] + #[doc = "<\\brief Pointer to the line numbers info\n array. Can be NULL if\n line_number_size is 0. See\n LineNumberInfo Structure for a\n description of a single entry in\n the line number info array."] pub line_number_table: pLineNumberInfo, #[doc = "<\\brief Class name. Can be NULL."] pub class_file_name: *mut ::std::os::raw::c_char, #[doc = "<\\brief Source file name. Can be NULL."] pub source_file_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief Module name. Can be NULL."] - #[doc = "The module name can be useful for distinguishing among"] - #[doc = "different JIT engines. VTune Amplifier will display"] - #[doc = "reported methods grouped by specific module."] + #[doc = "<\\brief Module name. Can be NULL.\nThe module name can be useful for distinguishing among\ndifferent JIT engines. VTune Amplifier will display\nreported methods grouped by specific module."] pub module_name: *mut ::std::os::raw::c_char, } #[test] fn bindgen_test_layout__iJIT_Method_Load_V2() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Load_V2> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Load_V2>(), 64usize, @@ -414,7 +256,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { concat!("Alignment of ", stringify!(_iJIT_Method_Load_V2)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -424,9 +266,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -436,10 +276,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_load_address as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -449,9 +286,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -461,9 +296,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).line_number_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -473,9 +306,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).line_number_table as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -485,9 +316,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).class_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -497,9 +326,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).source_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -509,9 +336,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).module_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_name) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -521,81 +346,39 @@ fn bindgen_test_layout__iJIT_Method_Load_V2() { ) ); } -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load_V2 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load_V2 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2\n as an event type to report it."] pub type piJIT_Method_Load_V2 = *mut _iJIT_Method_Load_V2; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details When you use the iJIT_Method_Load_V2 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details When you use the iJIT_Method_Load_V2 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2\n as an event type to report it."] pub type iJIT_Method_Load_V2 = _iJIT_Method_Load_V2; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2"] -#[doc = " with a newly introduced 'arch' field that specifies architecture of the code region."] -#[doc = " When you use the iJIT_Method_Load_V3 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2\n with a newly introduced 'arch' field that specifies architecture of the code region.\n When you use the iJIT_Method_Load_V3 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3\n as an event type to report it."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Load_V3 { - #[doc = "<\\brief Unique method ID. Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or manage ID uniqueness"] - #[doc = " and correct range by yourself.\\n"] - #[doc = " You must use the same method ID for all code"] - #[doc = " regions of the same method, otherwise they are"] - #[doc = " treated as regions of different methods."] + #[doc = "<\\brief Unique method ID. Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or manage ID uniqueness\n and correct range by yourself.\\n\n You must use the same method ID for all code\n regions of the same method, otherwise they are\n treated as regions of different methods."] pub method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief The name of the method. It can be optionally"] - #[doc = " prefixed with its class name and appended with"] - #[doc = " its complete signature. Cannot be NULL."] + #[doc = "<\\brief The name of the method. It can be optionally\n prefixed with its class name and appended with\n its complete signature. Cannot be NULL."] pub method_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief The start virtual address of the method code"] - #[doc = " region. If NULL, then data provided with the"] - #[doc = " event are not accepted."] + #[doc = "<\\brief The start virtual address of the method code\n region. If NULL, then data provided with the\n event are not accepted."] pub method_load_address: *mut ::std::os::raw::c_void, - #[doc = "<\\brief The code size of the method in memory."] - #[doc = " If 0, then data provided with the event are not"] - #[doc = " accepted."] + #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."] pub method_size: ::std::os::raw::c_uint, - #[doc = "<\\brief The number of entries in the line number"] - #[doc = " table. 0 if none."] + #[doc = "<\\brief The number of entries in the line number\n table. 0 if none."] pub line_number_size: ::std::os::raw::c_uint, - #[doc = "<\\brief Pointer to the line numbers info"] - #[doc = " array. Can be NULL if"] - #[doc = " line_number_size is 0. See"] - #[doc = " LineNumberInfo Structure for a"] - #[doc = " description of a single entry in"] - #[doc = " the line number info array."] + #[doc = "<\\brief Pointer to the line numbers info\n array. Can be NULL if\n line_number_size is 0. See\n LineNumberInfo Structure for a\n description of a single entry in\n the line number info array."] pub line_number_table: pLineNumberInfo, #[doc = "<\\brief Class name. Can be NULL."] pub class_file_name: *mut ::std::os::raw::c_char, #[doc = "<\\brief Source file name. Can be NULL."] pub source_file_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief Module name. Can be NULL."] - #[doc = " The module name can be useful for distinguishing among"] - #[doc = " different JIT engines. VTune Amplifier will display"] - #[doc = " reported methods grouped by specific module."] + #[doc = "<\\brief Module name. Can be NULL.\n The module name can be useful for distinguishing among\n different JIT engines. VTune Amplifier will display\n reported methods grouped by specific module."] pub module_name: *mut ::std::os::raw::c_char, - #[doc = "<\\brief Architecture of the method's code region."] - #[doc = " By default, it is the same as the process"] - #[doc = " architecture that is calling it."] - #[doc = " For example, you can use it if your 32-bit JIT"] - #[doc = " engine generates 64-bit code."] - #[doc = ""] - #[doc = " If JIT engine reports both 32-bit and 64-bit types"] - #[doc = " of methods then VTune Amplifier splits the methods"] - #[doc = " with the same module name but with different"] - #[doc = " architectures in two different modules. VTune Amplifier"] - #[doc = " modifies the original name provided with a 64-bit method"] - #[doc = " version by ending it with '(64)'"] + #[doc = "<\\brief Architecture of the method's code region.\n By default, it is the same as the process\n architecture that is calling it.\n For example, you can use it if your 32-bit JIT\n engine generates 64-bit code.\n\n If JIT engine reports both 32-bit and 64-bit types\n of methods then VTune Amplifier splits the methods\n with the same module name but with different\n architectures in two different modules. VTune Amplifier\n modifies the original name provided with a 64-bit method\n version by ending it with '(64)'"] pub module_arch: iJIT_CodeArchitecture, } #[test] fn bindgen_test_layout__iJIT_Method_Load_V3() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Load_V3> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Load_V3>(), 72usize, @@ -607,7 +390,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { concat!("Alignment of ", stringify!(_iJIT_Method_Load_V3)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -617,9 +400,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -629,10 +410,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_load_address as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -642,9 +420,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -654,9 +430,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).line_number_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -666,9 +440,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).line_number_table as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -678,9 +450,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).class_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -690,9 +460,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).source_file_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -702,9 +470,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).module_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_name) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -714,9 +480,7 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).module_arch as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).module_arch) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -726,58 +490,26 @@ fn bindgen_test_layout__iJIT_Method_Load_V3() { ) ); } -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2"] -#[doc = " with a newly introduced 'arch' field that specifies architecture of the code region."] -#[doc = " When you use the iJIT_Method_Load_V3 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2\n with a newly introduced 'arch' field that specifies architecture of the code region.\n When you use the iJIT_Method_Load_V3 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3\n as an event type to report it."] pub type piJIT_Method_Load_V3 = *mut _iJIT_Method_Load_V3; -#[doc = " @brief Description of a JIT-compiled method"] -#[doc = " @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2"] -#[doc = " with a newly introduced 'arch' field that specifies architecture of the code region."] -#[doc = " When you use the iJIT_Method_Load_V3 structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of a JIT-compiled method\n @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2\n with a newly introduced 'arch' field that specifies architecture of the code region.\n When you use the iJIT_Method_Load_V3 structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3\n as an event type to report it."] pub type iJIT_Method_Load_V3 = _iJIT_Method_Load_V3; -#[doc = " @brief Description of an inline JIT-compiled method"] -#[doc = " @details When you use the_iJIT_Method_Inline_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of an inline JIT-compiled method\n @details When you use the_iJIT_Method_Inline_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED\n as an event type to report it."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Inline_Load { - #[doc = "<\\brief Unique method ID. Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or else manage ID uniqueness"] - #[doc = " and correct range by yourself."] + #[doc = "<\\brief Unique method ID. Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or else manage ID uniqueness\n and correct range by yourself."] pub method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief Unique immediate parent's method ID."] - #[doc = " Cannot be 0."] - #[doc = " You must either use the API function"] - #[doc = " iJIT_GetNewMethodID to get a valid and unique"] - #[doc = " method ID, or else manage ID uniqueness"] - #[doc = " and correct range by yourself."] + #[doc = "<\\brief Unique immediate parent's method ID.\n Cannot be 0.\n You must either use the API function\n iJIT_GetNewMethodID to get a valid and unique\n method ID, or else manage ID uniqueness\n and correct range by yourself."] pub parent_method_id: ::std::os::raw::c_uint, - #[doc = "<\\brief The name of the method. It can be optionally"] - #[doc = " prefixed with its class name and appended with"] - #[doc = " its complete signature. Can't be NULL."] + #[doc = "<\\brief The name of the method. It can be optionally\n prefixed with its class name and appended with\n its complete signature. Can't be NULL."] pub method_name: *mut ::std::os::raw::c_char, pub method_load_address: *mut ::std::os::raw::c_void, - #[doc = "<\\brief The code size of the method in memory."] - #[doc = " If 0, then data provided with the event are not"] - #[doc = " accepted."] + #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."] pub method_size: ::std::os::raw::c_uint, - #[doc = "<\\brief The number of entries in the line number"] - #[doc = " table. 0 if none."] + #[doc = "<\\brief The number of entries in the line number\n table. 0 if none."] pub line_number_size: ::std::os::raw::c_uint, - #[doc = "<\\brief Pointer to the line numbers info"] - #[doc = " array. Can be NULL if"] - #[doc = " line_number_size is 0. See"] - #[doc = " LineNumberInfo Structure for a"] - #[doc = " description of a single entry in"] - #[doc = " the line number info array"] + #[doc = "<\\brief Pointer to the line numbers info\n array. Can be NULL if\n line_number_size is 0. See\n LineNumberInfo Structure for a\n description of a single entry in\n the line number info array"] pub line_number_table: pLineNumberInfo, #[doc = "<\\brief Class name. Can be NULL."] pub class_file_name: *mut ::std::os::raw::c_char, @@ -786,6 +518,9 @@ pub struct _iJIT_Method_Inline_Load { } #[test] fn bindgen_test_layout__iJIT_Method_Inline_Load() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Inline_Load> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Inline_Load>(), 56usize, @@ -797,9 +532,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { concat!("Alignment of ", stringify!(_iJIT_Method_Inline_Load)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_id as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -809,10 +542,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).parent_method_id as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).parent_method_id) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -822,9 +552,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -834,10 +562,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_load_address as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -847,9 +572,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -859,10 +582,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).line_number_size as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -872,10 +592,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).line_number_table as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -885,10 +602,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).class_file_name as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -898,10 +612,7 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).source_file_name as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -911,77 +622,23 @@ fn bindgen_test_layout__iJIT_Method_Inline_Load() { ) ); } -#[doc = " @brief Description of an inline JIT-compiled method"] -#[doc = " @details When you use the_iJIT_Method_Inline_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of an inline JIT-compiled method\n @details When you use the_iJIT_Method_Inline_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED\n as an event type to report it."] pub type piJIT_Method_Inline_Load = *mut _iJIT_Method_Inline_Load; -#[doc = " @brief Description of an inline JIT-compiled method"] -#[doc = " @details When you use the_iJIT_Method_Inline_Load structure to describe"] -#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED"] -#[doc = " as an event type to report it."] +#[doc = " @brief Description of an inline JIT-compiled method\n @details When you use the_iJIT_Method_Inline_Load structure to describe\n the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED\n as an event type to report it."] pub type iJIT_Method_Inline_Load = _iJIT_Method_Inline_Load; pub const _iJIT_SegmentType_iJIT_CT_UNKNOWN: _iJIT_SegmentType = 0; #[doc = "<\\brief Executable code."] pub const _iJIT_SegmentType_iJIT_CT_CODE: _iJIT_SegmentType = 1; -#[doc = "<\\brief Data (not executable code)."] -#[doc = " VTune Amplifier uses the format string"] -#[doc = " (see iJIT_Method_Update) to represent"] -#[doc = " this data in the VTune Amplifier GUI"] +#[doc = "<\\brief Data (not executable code).\n VTune Amplifier uses the format string\n (see iJIT_Method_Update) to represent\n this data in the VTune Amplifier GUI"] pub const _iJIT_SegmentType_iJIT_CT_DATA: _iJIT_SegmentType = 2; -#[doc = "<\\brief Use the previous markup for the trace."] -#[doc = " Can be used for the following"] -#[doc = " iJVM_EVENT_TYPE_METHOD_UPDATE_V2 events,"] -#[doc = " if the type of the previously reported segment"] -#[doc = " type is the same."] +#[doc = "<\\brief Use the previous markup for the trace.\n Can be used for the following\n iJVM_EVENT_TYPE_METHOD_UPDATE_V2 events,\n if the type of the previously reported segment\n type is the same."] pub const _iJIT_SegmentType_iJIT_CT_KEEP: _iJIT_SegmentType = 3; pub const _iJIT_SegmentType_iJIT_CT_EOF: _iJIT_SegmentType = 4; -#[doc = " @cond exclude_from_documentation */"] -#[doc = " @brief Description of a segment type"] -#[doc = " @details Use the segment type to specify a type of data supplied"] -#[doc = " with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to"] -#[doc = " a certain code trace."] +#[doc = " @cond exclude_from_documentation */\n/**\n @brief Description of a segment type\n @details Use the segment type to specify a type of data supplied\n with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to\n a certain code trace."] pub type _iJIT_SegmentType = ::std::os::raw::c_int; -#[doc = " @cond exclude_from_documentation */"] -#[doc = " @brief Description of a segment type"] -#[doc = " @details Use the segment type to specify a type of data supplied"] -#[doc = " with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to"] -#[doc = " a certain code trace."] +#[doc = " @cond exclude_from_documentation */\n/**\n @brief Description of a segment type\n @details Use the segment type to specify a type of data supplied\n with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to\n a certain code trace."] pub use self::_iJIT_SegmentType as iJIT_SegmentType; -#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method"] -#[doc = " @details The JIT engine may generate the methods that are updated at runtime"] -#[doc = " partially by mixed (data + executable code) content. When you use the iJIT_Method_Update"] -#[doc = " structure to describe the update of the content within a JIT-compiled method,"] -#[doc = " use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it."] -#[doc = ""] -#[doc = " On the first Update event, VTune Amplifier copies the original code range reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and"] -#[doc = " adds the modified range to the original method. For next update events, VTune Amplifier"] -#[doc = " does the same but it uses the latest modified version of a code region for update."] -#[doc = " Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event."] -#[doc = " Notes:"] -#[doc = " - Multiple update events with different types for the same trace are allowed"] -#[doc = " but they must be reported for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [code] Ignored"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] -#[doc = " - The types of previously reported events can be changed but they must be reported"] -#[doc = " for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] +#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method\n @details The JIT engine may generate the methods that are updated at runtime\n partially by mixed (data + executable code) content. When you use the iJIT_Method_Update\n structure to describe the update of the content within a JIT-compiled method,\n use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it.\n\n On the first Update event, VTune Amplifier copies the original code range reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and\n adds the modified range to the original method. For next update events, VTune Amplifier\n does the same but it uses the latest modified version of a code region for update.\n Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event.\n Notes:\n - Multiple update events with different types for the same trace are allowed\n but they must be reported for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [code] Ignored\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode\n - The types of previously reported events can be changed but they must be reported\n for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _iJIT_Method_Update { @@ -991,15 +648,13 @@ pub struct _iJIT_Method_Update { pub size: ::std::os::raw::c_uint, #[doc = "<\\brief Type of the update"] pub type_: iJIT_SegmentType, - #[doc = "<\\brief C string that contains a format string"] - #[doc = " that follows the same specifications as format in printf."] - #[doc = " The format string is used for iJIT_CT_CODE only"] - #[doc = " and cannot be NULL."] - #[doc = " Format can be changed on the fly."] + #[doc = "<\\brief C string that contains a format string\n that follows the same specifications as format in printf.\n The format string is used for iJIT_CT_CODE only\n and cannot be NULL.\n Format can be changed on the fly."] pub data_format: *const ::std::os::raw::c_char, } #[test] fn bindgen_test_layout__iJIT_Method_Update() { + const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Update> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_iJIT_Method_Update>(), 24usize, @@ -1011,9 +666,7 @@ fn bindgen_test_layout__iJIT_Method_Update() { concat!("Alignment of ", stringify!(_iJIT_Method_Update)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_iJIT_Method_Update>())).load_address as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).load_address) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1023,7 +676,7 @@ fn bindgen_test_layout__iJIT_Method_Update() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Update>())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1033,7 +686,7 @@ fn bindgen_test_layout__iJIT_Method_Update() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Update>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -1043,7 +696,7 @@ fn bindgen_test_layout__iJIT_Method_Update() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_iJIT_Method_Update>())).data_format as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data_format) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1053,106 +706,20 @@ fn bindgen_test_layout__iJIT_Method_Update() { ) ); } -#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method"] -#[doc = " @details The JIT engine may generate the methods that are updated at runtime"] -#[doc = " partially by mixed (data + executable code) content. When you use the iJIT_Method_Update"] -#[doc = " structure to describe the update of the content within a JIT-compiled method,"] -#[doc = " use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it."] -#[doc = ""] -#[doc = " On the first Update event, VTune Amplifier copies the original code range reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and"] -#[doc = " adds the modified range to the original method. For next update events, VTune Amplifier"] -#[doc = " does the same but it uses the latest modified version of a code region for update."] -#[doc = " Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event."] -#[doc = " Notes:"] -#[doc = " - Multiple update events with different types for the same trace are allowed"] -#[doc = " but they must be reported for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [code] Ignored"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] -#[doc = " - The types of previously reported events can be changed but they must be reported"] -#[doc = " for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] +#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method\n @details The JIT engine may generate the methods that are updated at runtime\n partially by mixed (data + executable code) content. When you use the iJIT_Method_Update\n structure to describe the update of the content within a JIT-compiled method,\n use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it.\n\n On the first Update event, VTune Amplifier copies the original code range reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and\n adds the modified range to the original method. For next update events, VTune Amplifier\n does the same but it uses the latest modified version of a code region for update.\n Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event.\n Notes:\n - Multiple update events with different types for the same trace are allowed\n but they must be reported for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [code] Ignored\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode\n - The types of previously reported events can be changed but they must be reported\n for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode"] pub type piJIT_Method_Update = *mut _iJIT_Method_Update; -#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method"] -#[doc = " @details The JIT engine may generate the methods that are updated at runtime"] -#[doc = " partially by mixed (data + executable code) content. When you use the iJIT_Method_Update"] -#[doc = " structure to describe the update of the content within a JIT-compiled method,"] -#[doc = " use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it."] -#[doc = ""] -#[doc = " On the first Update event, VTune Amplifier copies the original code range reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and"] -#[doc = " adds the modified range to the original method. For next update events, VTune Amplifier"] -#[doc = " does the same but it uses the latest modified version of a code region for update."] -#[doc = " Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by"] -#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event."] -#[doc = " Notes:"] -#[doc = " - Multiple update events with different types for the same trace are allowed"] -#[doc = " but they must be reported for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [code] Ignored"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] -#[doc = " - The types of previously reported events can be changed but they must be reported"] -#[doc = " for the same code ranges."] -#[doc = " Example,"] -#[doc = " @code"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [-- data---] Allowed"] -#[doc = " [-- code --] Allowed"] -#[doc = " [------------ trace ---------]"] -#[doc = " @endcode"] +#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method\n @details The JIT engine may generate the methods that are updated at runtime\n partially by mixed (data + executable code) content. When you use the iJIT_Method_Update\n structure to describe the update of the content within a JIT-compiled method,\n use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it.\n\n On the first Update event, VTune Amplifier copies the original code range reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and\n adds the modified range to the original method. For next update events, VTune Amplifier\n does the same but it uses the latest modified version of a code region for update.\n Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by\n the iJVM_EVENT_TYPE_METHOD_LOAD event.\n Notes:\n - Multiple update events with different types for the same trace are allowed\n but they must be reported for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [code] Ignored\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode\n - The types of previously reported events can be changed but they must be reported\n for the same code ranges.\n Example,\n @code\n [-- data---] Allowed\n [-- code --] Allowed\n [-- data---] Allowed\n [-- code --] Allowed\n [------------ trace ---------]\n @endcode"] pub type iJIT_Method_Update = _iJIT_Method_Update; extern "C" { - #[doc = " @brief Generates a new unique method ID."] - #[doc = ""] - #[doc = " You must use this API to obtain unique and valid method IDs for methods or"] - #[doc = " traces reported to the agent if you don't have your own mechanism to generate"] - #[doc = " unique method IDs."] - #[doc = ""] - #[doc = " @return a new unique method ID. When out of unique method IDs, this API"] - #[doc = " returns 0, which is not an accepted value."] + #[doc = " @brief Generates a new unique method ID.\n\n You must use this API to obtain unique and valid method IDs for methods or\n traces reported to the agent if you don't have your own mechanism to generate\n unique method IDs.\n\n @return a new unique method ID. When out of unique method IDs, this API\n returns 0, which is not an accepted value."] pub fn iJIT_GetNewMethodID() -> ::std::os::raw::c_uint; } extern "C" { - #[doc = " @brief Returns the current mode of the agent."] - #[doc = ""] - #[doc = " @return iJIT_SAMPLING_ON, indicating that agent is running, or"] - #[doc = " iJIT_NOTHING_RUNNING if no agent is running."] + #[doc = " @brief Returns the current mode of the agent.\n\n @return iJIT_SAMPLING_ON, indicating that agent is running, or\n iJIT_NOTHING_RUNNING if no agent is running."] pub fn iJIT_IsProfilingActive() -> iJIT_IsProfilingActiveFlags; } extern "C" { - #[doc = " @brief Reports infomation about JIT-compiled code to the agent."] - #[doc = ""] - #[doc = " The reported information is used to attribute samples obtained from any"] - #[doc = " Intel(R) VTune(TM) Amplifier collector. This API needs to be called"] - #[doc = " after JIT compilation and before the first entry into the JIT-compiled"] - #[doc = " code."] - #[doc = ""] - #[doc = " @param[in] event_type - type of the data sent to the agent"] - #[doc = " @param[in] EventSpecificData - pointer to event-specific data"] - #[doc = ""] - #[doc = " @returns 1 on success, otherwise 0."] + #[doc = " @brief Reports infomation about JIT-compiled code to the agent.\n\n The reported information is used to attribute samples obtained from any\n Intel(R) VTune(TM) Amplifier collector. This API needs to be called\n after JIT compilation and before the first entry into the JIT-compiled\n code.\n\n @param[in] event_type - type of the data sent to the agent\n @param[in] EventSpecificData - pointer to event-specific data\n\n @returns 1 on success, otherwise 0."] pub fn iJIT_NotifyEvent( event_type: iJIT_JVM_EVENT, EventSpecificData: *mut ::std::os::raw::c_void,