1#[doc = "<\\brief Send this to shutdown the agent.\n Use NULL for event data."]
4pub const iJIT_jvm_event_iJVM_EVENT_TYPE_SHUTDOWN: iJIT_jvm_event = 2;
5#[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."]
6pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED: iJIT_jvm_event = 13;
7#[doc = "<\\brief Send when compiled dynamic\n code is being unloaded from memory.\n Use iJIT_Method_Load as event data."]
8pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UNLOAD_START: iJIT_jvm_event = 14;
9#[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."]
10pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UPDATE: iJIT_jvm_event = 15;
11#[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."]
12pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED: iJIT_jvm_event = 16;
13#[doc = " @cond exclude_from_documentation"]
14pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UPDATE_V2: iJIT_jvm_event = 17;
15#[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."]
16pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2: iJIT_jvm_event = 21;
17#[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."]
18pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3: iJIT_jvm_event = 22;
19#[doc = " @brief Enumerator for the types of notifications"]
20pub type iJIT_jvm_event = ::std::os::raw::c_uint;
21#[doc = " @brief Enumerator for the types of notifications"]
22pub use self::iJIT_jvm_event as iJIT_JVM_EVENT;
23#[doc = "<\\brief The agent is not running;\n iJIT_NotifyEvent calls will\n not be processed."]
24pub const _iJIT_IsProfilingActiveFlags_iJIT_NOTHING_RUNNING: _iJIT_IsProfilingActiveFlags = 0;
25#[doc = "<\\brief The agent is running and\n ready to process notifications."]
26pub const _iJIT_IsProfilingActiveFlags_iJIT_SAMPLING_ON: _iJIT_IsProfilingActiveFlags = 1;
27#[doc = " @brief Enumerator for the agent's mode"]
28pub type _iJIT_IsProfilingActiveFlags = ::std::os::raw::c_uint;
29#[doc = " @brief Enumerator for the agent's mode"]
30pub use self::_iJIT_IsProfilingActiveFlags as iJIT_IsProfilingActiveFlags;
31#[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) Profiler 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 Profiler 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"]
32#[repr(C)]
33#[derive(Debug, Copy, Clone)]
34pub struct _LineNumberInfo {
35 #[doc = "<\\brief Offset from the begining of the code region."]
36 pub Offset: ::std::os::raw::c_uint,
37 #[doc = "<\\brief Matching source line number offset (from beginning of source file)."]
38 pub LineNumber: ::std::os::raw::c_uint,
39}
40#[test]
41fn bindgen_test_layout__LineNumberInfo() {
42 const UNINIT: ::std::mem::MaybeUninit<_LineNumberInfo> = ::std::mem::MaybeUninit::uninit();
43 let ptr = UNINIT.as_ptr();
44 assert_eq!(
45 ::std::mem::size_of::<_LineNumberInfo>(),
46 8usize,
47 concat!("Size of: ", stringify!(_LineNumberInfo))
48 );
49 assert_eq!(
50 ::std::mem::align_of::<_LineNumberInfo>(),
51 4usize,
52 concat!("Alignment of ", stringify!(_LineNumberInfo))
53 );
54 assert_eq!(
55 unsafe { ::std::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize },
56 0usize,
57 concat!(
58 "Offset of field: ",
59 stringify!(_LineNumberInfo),
60 "::",
61 stringify!(Offset)
62 )
63 );
64 assert_eq!(
65 unsafe { ::std::ptr::addr_of!((*ptr).LineNumber) as usize - ptr as usize },
66 4usize,
67 concat!(
68 "Offset of field: ",
69 stringify!(_LineNumberInfo),
70 "::",
71 stringify!(LineNumber)
72 )
73 );
74}
75#[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) Profiler 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 Profiler 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"]
76pub type pLineNumberInfo = *mut _LineNumberInfo;
77#[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) Profiler 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 Profiler 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"]
78pub type LineNumberInfo = _LineNumberInfo;
79#[doc = "<\\brief Native to the process architecture that is calling it."]
80pub const _iJIT_CodeArchitecture_iJIT_CA_NATIVE: _iJIT_CodeArchitecture = 0;
81#[doc = "<\\brief 32-bit machine code."]
82pub const _iJIT_CodeArchitecture_iJIT_CA_32: _iJIT_CodeArchitecture = 1;
83#[doc = "<\\brief 64-bit machine code."]
84pub const _iJIT_CodeArchitecture_iJIT_CA_64: _iJIT_CodeArchitecture = 2;
85#[doc = " @brief Enumerator for the code architecture."]
86pub type _iJIT_CodeArchitecture = ::std::os::raw::c_uint;
87#[doc = " @brief Enumerator for the code architecture."]
88pub use self::_iJIT_CodeArchitecture as iJIT_CodeArchitecture;
89#[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."]
90#[repr(C)]
91#[derive(Debug, Copy, Clone)]
92pub struct _iJIT_Method_Load {
93 #[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."]
94 pub method_id: ::std::os::raw::c_uint,
95 #[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."]
96 pub method_name: *mut ::std::os::raw::c_char,
97 #[doc = "<\\brief The start virtual address of the method code\n region. If NULL, data provided with\n event are not accepted."]
98 pub method_load_address: *mut ::std::os::raw::c_void,
99 #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."]
100 pub method_size: ::std::os::raw::c_uint,
101 #[doc = "<\\brief The number of entries in the line number\n table.0 if none."]
102 pub line_number_size: ::std::os::raw::c_uint,
103 #[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"]
104 pub line_number_table: pLineNumberInfo,
105 #[doc = "<\\brief This field is obsolete."]
106 pub class_id: ::std::os::raw::c_uint,
107 #[doc = "<\\brief Class name. Can be NULL."]
108 pub class_file_name: *mut ::std::os::raw::c_char,
109 #[doc = "<\\brief Source file name. Can be NULL."]
110 pub source_file_name: *mut ::std::os::raw::c_char,
111}
112#[test]
113fn bindgen_test_layout__iJIT_Method_Load() {
114 const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Load> = ::std::mem::MaybeUninit::uninit();
115 let ptr = UNINIT.as_ptr();
116 assert_eq!(
117 ::std::mem::size_of::<_iJIT_Method_Load>(),
118 64usize,
119 concat!("Size of: ", stringify!(_iJIT_Method_Load))
120 );
121 assert_eq!(
122 ::std::mem::align_of::<_iJIT_Method_Load>(),
123 8usize,
124 concat!("Alignment of ", stringify!(_iJIT_Method_Load))
125 );
126 assert_eq!(
127 unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize },
128 0usize,
129 concat!(
130 "Offset of field: ",
131 stringify!(_iJIT_Method_Load),
132 "::",
133 stringify!(method_id)
134 )
135 );
136 assert_eq!(
137 unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize },
138 8usize,
139 concat!(
140 "Offset of field: ",
141 stringify!(_iJIT_Method_Load),
142 "::",
143 stringify!(method_name)
144 )
145 );
146 assert_eq!(
147 unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize },
148 16usize,
149 concat!(
150 "Offset of field: ",
151 stringify!(_iJIT_Method_Load),
152 "::",
153 stringify!(method_load_address)
154 )
155 );
156 assert_eq!(
157 unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize },
158 24usize,
159 concat!(
160 "Offset of field: ",
161 stringify!(_iJIT_Method_Load),
162 "::",
163 stringify!(method_size)
164 )
165 );
166 assert_eq!(
167 unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize },
168 28usize,
169 concat!(
170 "Offset of field: ",
171 stringify!(_iJIT_Method_Load),
172 "::",
173 stringify!(line_number_size)
174 )
175 );
176 assert_eq!(
177 unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize },
178 32usize,
179 concat!(
180 "Offset of field: ",
181 stringify!(_iJIT_Method_Load),
182 "::",
183 stringify!(line_number_table)
184 )
185 );
186 assert_eq!(
187 unsafe { ::std::ptr::addr_of!((*ptr).class_id) as usize - ptr as usize },
188 40usize,
189 concat!(
190 "Offset of field: ",
191 stringify!(_iJIT_Method_Load),
192 "::",
193 stringify!(class_id)
194 )
195 );
196 assert_eq!(
197 unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize },
198 48usize,
199 concat!(
200 "Offset of field: ",
201 stringify!(_iJIT_Method_Load),
202 "::",
203 stringify!(class_file_name)
204 )
205 );
206 assert_eq!(
207 unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize },
208 56usize,
209 concat!(
210 "Offset of field: ",
211 stringify!(_iJIT_Method_Load),
212 "::",
213 stringify!(source_file_name)
214 )
215 );
216}
217#[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."]
218pub type piJIT_Method_Load = *mut _iJIT_Method_Load;
219#[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."]
220pub type iJIT_Method_Load = _iJIT_Method_Load;
221#[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."]
222#[repr(C)]
223#[derive(Debug, Copy, Clone)]
224pub struct _iJIT_Method_Load_V2 {
225 #[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."]
226 pub method_id: ::std::os::raw::c_uint,
227 #[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."]
228 pub method_name: *mut ::std::os::raw::c_char,
229 #[doc = "<\\brief The start virtual address of the method code\n region. If NULL, then data provided with the\n event are not accepted."]
230 pub method_load_address: *mut ::std::os::raw::c_void,
231 #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."]
232 pub method_size: ::std::os::raw::c_uint,
233 #[doc = "<\\brief The number of entries in the line number\n table. 0 if none."]
234 pub line_number_size: ::std::os::raw::c_uint,
235 #[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."]
236 pub line_number_table: pLineNumberInfo,
237 #[doc = "<\\brief Class name. Can be NULL."]
238 pub class_file_name: *mut ::std::os::raw::c_char,
239 #[doc = "<\\brief Source file name. Can be NULL."]
240 pub source_file_name: *mut ::std::os::raw::c_char,
241 #[doc = "<\\brief Module name. Can be NULL.\nThe module name can be useful for distinguishing among\ndifferent JIT engines. VTune Profiler will display\nreported methods grouped by specific module."]
242 pub module_name: *mut ::std::os::raw::c_char,
243}
244#[test]
245fn bindgen_test_layout__iJIT_Method_Load_V2() {
246 const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Load_V2> = ::std::mem::MaybeUninit::uninit();
247 let ptr = UNINIT.as_ptr();
248 assert_eq!(
249 ::std::mem::size_of::<_iJIT_Method_Load_V2>(),
250 64usize,
251 concat!("Size of: ", stringify!(_iJIT_Method_Load_V2))
252 );
253 assert_eq!(
254 ::std::mem::align_of::<_iJIT_Method_Load_V2>(),
255 8usize,
256 concat!("Alignment of ", stringify!(_iJIT_Method_Load_V2))
257 );
258 assert_eq!(
259 unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize },
260 0usize,
261 concat!(
262 "Offset of field: ",
263 stringify!(_iJIT_Method_Load_V2),
264 "::",
265 stringify!(method_id)
266 )
267 );
268 assert_eq!(
269 unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize },
270 8usize,
271 concat!(
272 "Offset of field: ",
273 stringify!(_iJIT_Method_Load_V2),
274 "::",
275 stringify!(method_name)
276 )
277 );
278 assert_eq!(
279 unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize },
280 16usize,
281 concat!(
282 "Offset of field: ",
283 stringify!(_iJIT_Method_Load_V2),
284 "::",
285 stringify!(method_load_address)
286 )
287 );
288 assert_eq!(
289 unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize },
290 24usize,
291 concat!(
292 "Offset of field: ",
293 stringify!(_iJIT_Method_Load_V2),
294 "::",
295 stringify!(method_size)
296 )
297 );
298 assert_eq!(
299 unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize },
300 28usize,
301 concat!(
302 "Offset of field: ",
303 stringify!(_iJIT_Method_Load_V2),
304 "::",
305 stringify!(line_number_size)
306 )
307 );
308 assert_eq!(
309 unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize },
310 32usize,
311 concat!(
312 "Offset of field: ",
313 stringify!(_iJIT_Method_Load_V2),
314 "::",
315 stringify!(line_number_table)
316 )
317 );
318 assert_eq!(
319 unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize },
320 40usize,
321 concat!(
322 "Offset of field: ",
323 stringify!(_iJIT_Method_Load_V2),
324 "::",
325 stringify!(class_file_name)
326 )
327 );
328 assert_eq!(
329 unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize },
330 48usize,
331 concat!(
332 "Offset of field: ",
333 stringify!(_iJIT_Method_Load_V2),
334 "::",
335 stringify!(source_file_name)
336 )
337 );
338 assert_eq!(
339 unsafe { ::std::ptr::addr_of!((*ptr).module_name) as usize - ptr as usize },
340 56usize,
341 concat!(
342 "Offset of field: ",
343 stringify!(_iJIT_Method_Load_V2),
344 "::",
345 stringify!(module_name)
346 )
347 );
348}
349#[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."]
350pub type piJIT_Method_Load_V2 = *mut _iJIT_Method_Load_V2;
351#[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."]
352pub type iJIT_Method_Load_V2 = _iJIT_Method_Load_V2;
353#[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."]
354#[repr(C)]
355#[derive(Debug, Copy, Clone)]
356pub struct _iJIT_Method_Load_V3 {
357 #[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."]
358 pub method_id: ::std::os::raw::c_uint,
359 #[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."]
360 pub method_name: *mut ::std::os::raw::c_char,
361 #[doc = "<\\brief The start virtual address of the method code\n region. If NULL, then data provided with the\n event are not accepted."]
362 pub method_load_address: *mut ::std::os::raw::c_void,
363 #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."]
364 pub method_size: ::std::os::raw::c_uint,
365 #[doc = "<\\brief The number of entries in the line number\n table. 0 if none."]
366 pub line_number_size: ::std::os::raw::c_uint,
367 #[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."]
368 pub line_number_table: pLineNumberInfo,
369 #[doc = "<\\brief Class name. Can be NULL."]
370 pub class_file_name: *mut ::std::os::raw::c_char,
371 #[doc = "<\\brief Source file name. Can be NULL."]
372 pub source_file_name: *mut ::std::os::raw::c_char,
373 #[doc = "<\\brief Module name. Can be NULL.\n The module name can be useful for distinguishing among\n different JIT engines. VTune Profiler will display\n reported methods grouped by specific module."]
374 pub module_name: *mut ::std::os::raw::c_char,
375 #[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 Profiler splits the methods\n with the same module name but with different\n architectures in two different modules. VTune Profiler\n modifies the original name provided with a 64-bit method\n version by ending it with '(64)'"]
376 pub module_arch: iJIT_CodeArchitecture,
377}
378#[test]
379fn bindgen_test_layout__iJIT_Method_Load_V3() {
380 const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Load_V3> = ::std::mem::MaybeUninit::uninit();
381 let ptr = UNINIT.as_ptr();
382 assert_eq!(
383 ::std::mem::size_of::<_iJIT_Method_Load_V3>(),
384 72usize,
385 concat!("Size of: ", stringify!(_iJIT_Method_Load_V3))
386 );
387 assert_eq!(
388 ::std::mem::align_of::<_iJIT_Method_Load_V3>(),
389 8usize,
390 concat!("Alignment of ", stringify!(_iJIT_Method_Load_V3))
391 );
392 assert_eq!(
393 unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize },
394 0usize,
395 concat!(
396 "Offset of field: ",
397 stringify!(_iJIT_Method_Load_V3),
398 "::",
399 stringify!(method_id)
400 )
401 );
402 assert_eq!(
403 unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize },
404 8usize,
405 concat!(
406 "Offset of field: ",
407 stringify!(_iJIT_Method_Load_V3),
408 "::",
409 stringify!(method_name)
410 )
411 );
412 assert_eq!(
413 unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize },
414 16usize,
415 concat!(
416 "Offset of field: ",
417 stringify!(_iJIT_Method_Load_V3),
418 "::",
419 stringify!(method_load_address)
420 )
421 );
422 assert_eq!(
423 unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize },
424 24usize,
425 concat!(
426 "Offset of field: ",
427 stringify!(_iJIT_Method_Load_V3),
428 "::",
429 stringify!(method_size)
430 )
431 );
432 assert_eq!(
433 unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize },
434 28usize,
435 concat!(
436 "Offset of field: ",
437 stringify!(_iJIT_Method_Load_V3),
438 "::",
439 stringify!(line_number_size)
440 )
441 );
442 assert_eq!(
443 unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize },
444 32usize,
445 concat!(
446 "Offset of field: ",
447 stringify!(_iJIT_Method_Load_V3),
448 "::",
449 stringify!(line_number_table)
450 )
451 );
452 assert_eq!(
453 unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize },
454 40usize,
455 concat!(
456 "Offset of field: ",
457 stringify!(_iJIT_Method_Load_V3),
458 "::",
459 stringify!(class_file_name)
460 )
461 );
462 assert_eq!(
463 unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize },
464 48usize,
465 concat!(
466 "Offset of field: ",
467 stringify!(_iJIT_Method_Load_V3),
468 "::",
469 stringify!(source_file_name)
470 )
471 );
472 assert_eq!(
473 unsafe { ::std::ptr::addr_of!((*ptr).module_name) as usize - ptr as usize },
474 56usize,
475 concat!(
476 "Offset of field: ",
477 stringify!(_iJIT_Method_Load_V3),
478 "::",
479 stringify!(module_name)
480 )
481 );
482 assert_eq!(
483 unsafe { ::std::ptr::addr_of!((*ptr).module_arch) as usize - ptr as usize },
484 64usize,
485 concat!(
486 "Offset of field: ",
487 stringify!(_iJIT_Method_Load_V3),
488 "::",
489 stringify!(module_arch)
490 )
491 );
492}
493#[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."]
494pub type piJIT_Method_Load_V3 = *mut _iJIT_Method_Load_V3;
495#[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."]
496pub type iJIT_Method_Load_V3 = _iJIT_Method_Load_V3;
497#[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."]
498#[repr(C)]
499#[derive(Debug, Copy, Clone)]
500pub struct _iJIT_Method_Inline_Load {
501 #[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."]
502 pub method_id: ::std::os::raw::c_uint,
503 #[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."]
504 pub parent_method_id: ::std::os::raw::c_uint,
505 #[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."]
506 pub method_name: *mut ::std::os::raw::c_char,
507 pub method_load_address: *mut ::std::os::raw::c_void,
508 #[doc = "<\\brief The code size of the method in memory.\n If 0, then data provided with the event are not\n accepted."]
509 pub method_size: ::std::os::raw::c_uint,
510 #[doc = "<\\brief The number of entries in the line number\n table. 0 if none."]
511 pub line_number_size: ::std::os::raw::c_uint,
512 #[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"]
513 pub line_number_table: pLineNumberInfo,
514 #[doc = "<\\brief Class name. Can be NULL."]
515 pub class_file_name: *mut ::std::os::raw::c_char,
516 #[doc = "<\\brief Source file name. Can be NULL."]
517 pub source_file_name: *mut ::std::os::raw::c_char,
518}
519#[test]
520fn bindgen_test_layout__iJIT_Method_Inline_Load() {
521 const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Inline_Load> =
522 ::std::mem::MaybeUninit::uninit();
523 let ptr = UNINIT.as_ptr();
524 assert_eq!(
525 ::std::mem::size_of::<_iJIT_Method_Inline_Load>(),
526 56usize,
527 concat!("Size of: ", stringify!(_iJIT_Method_Inline_Load))
528 );
529 assert_eq!(
530 ::std::mem::align_of::<_iJIT_Method_Inline_Load>(),
531 8usize,
532 concat!("Alignment of ", stringify!(_iJIT_Method_Inline_Load))
533 );
534 assert_eq!(
535 unsafe { ::std::ptr::addr_of!((*ptr).method_id) as usize - ptr as usize },
536 0usize,
537 concat!(
538 "Offset of field: ",
539 stringify!(_iJIT_Method_Inline_Load),
540 "::",
541 stringify!(method_id)
542 )
543 );
544 assert_eq!(
545 unsafe { ::std::ptr::addr_of!((*ptr).parent_method_id) as usize - ptr as usize },
546 4usize,
547 concat!(
548 "Offset of field: ",
549 stringify!(_iJIT_Method_Inline_Load),
550 "::",
551 stringify!(parent_method_id)
552 )
553 );
554 assert_eq!(
555 unsafe { ::std::ptr::addr_of!((*ptr).method_name) as usize - ptr as usize },
556 8usize,
557 concat!(
558 "Offset of field: ",
559 stringify!(_iJIT_Method_Inline_Load),
560 "::",
561 stringify!(method_name)
562 )
563 );
564 assert_eq!(
565 unsafe { ::std::ptr::addr_of!((*ptr).method_load_address) as usize - ptr as usize },
566 16usize,
567 concat!(
568 "Offset of field: ",
569 stringify!(_iJIT_Method_Inline_Load),
570 "::",
571 stringify!(method_load_address)
572 )
573 );
574 assert_eq!(
575 unsafe { ::std::ptr::addr_of!((*ptr).method_size) as usize - ptr as usize },
576 24usize,
577 concat!(
578 "Offset of field: ",
579 stringify!(_iJIT_Method_Inline_Load),
580 "::",
581 stringify!(method_size)
582 )
583 );
584 assert_eq!(
585 unsafe { ::std::ptr::addr_of!((*ptr).line_number_size) as usize - ptr as usize },
586 28usize,
587 concat!(
588 "Offset of field: ",
589 stringify!(_iJIT_Method_Inline_Load),
590 "::",
591 stringify!(line_number_size)
592 )
593 );
594 assert_eq!(
595 unsafe { ::std::ptr::addr_of!((*ptr).line_number_table) as usize - ptr as usize },
596 32usize,
597 concat!(
598 "Offset of field: ",
599 stringify!(_iJIT_Method_Inline_Load),
600 "::",
601 stringify!(line_number_table)
602 )
603 );
604 assert_eq!(
605 unsafe { ::std::ptr::addr_of!((*ptr).class_file_name) as usize - ptr as usize },
606 40usize,
607 concat!(
608 "Offset of field: ",
609 stringify!(_iJIT_Method_Inline_Load),
610 "::",
611 stringify!(class_file_name)
612 )
613 );
614 assert_eq!(
615 unsafe { ::std::ptr::addr_of!((*ptr).source_file_name) as usize - ptr as usize },
616 48usize,
617 concat!(
618 "Offset of field: ",
619 stringify!(_iJIT_Method_Inline_Load),
620 "::",
621 stringify!(source_file_name)
622 )
623 );
624}
625#[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."]
626pub type piJIT_Method_Inline_Load = *mut _iJIT_Method_Inline_Load;
627#[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."]
628pub type iJIT_Method_Inline_Load = _iJIT_Method_Inline_Load;
629pub const _iJIT_SegmentType_iJIT_CT_UNKNOWN: _iJIT_SegmentType = 0;
630#[doc = "<\\brief Executable code."]
631pub const _iJIT_SegmentType_iJIT_CT_CODE: _iJIT_SegmentType = 1;
632#[doc = "<\\brief Data (not executable code).\n VTune Profiler uses the format string\n (see iJIT_Method_Update) to represent\n this data in the VTune Profiler GUI"]
633pub const _iJIT_SegmentType_iJIT_CT_DATA: _iJIT_SegmentType = 2;
634#[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."]
635pub const _iJIT_SegmentType_iJIT_CT_KEEP: _iJIT_SegmentType = 3;
636pub const _iJIT_SegmentType_iJIT_CT_EOF: _iJIT_SegmentType = 4;
637#[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."]
638pub type _iJIT_SegmentType = ::std::os::raw::c_uint;
639#[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."]
640pub use self::_iJIT_SegmentType as iJIT_SegmentType;
641#[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 Profiler 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 Profiler\n does the same but it uses the latest modified version of a code region for update.\n Eventually, VTune Profiler 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"]
642#[repr(C)]
643#[derive(Debug, Copy, Clone)]
644pub struct _iJIT_Method_Update {
645 #[doc = "<\\brief Start address of the update within a method"]
646 pub load_address: *mut ::std::os::raw::c_void,
647 #[doc = "<\\brief The update size"]
648 pub size: ::std::os::raw::c_uint,
649 #[doc = "<\\brief Type of the update"]
650 pub type_: iJIT_SegmentType,
651 #[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."]
652 pub data_format: *const ::std::os::raw::c_char,
653}
654#[test]
655fn bindgen_test_layout__iJIT_Method_Update() {
656 const UNINIT: ::std::mem::MaybeUninit<_iJIT_Method_Update> = ::std::mem::MaybeUninit::uninit();
657 let ptr = UNINIT.as_ptr();
658 assert_eq!(
659 ::std::mem::size_of::<_iJIT_Method_Update>(),
660 24usize,
661 concat!("Size of: ", stringify!(_iJIT_Method_Update))
662 );
663 assert_eq!(
664 ::std::mem::align_of::<_iJIT_Method_Update>(),
665 8usize,
666 concat!("Alignment of ", stringify!(_iJIT_Method_Update))
667 );
668 assert_eq!(
669 unsafe { ::std::ptr::addr_of!((*ptr).load_address) as usize - ptr as usize },
670 0usize,
671 concat!(
672 "Offset of field: ",
673 stringify!(_iJIT_Method_Update),
674 "::",
675 stringify!(load_address)
676 )
677 );
678 assert_eq!(
679 unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
680 8usize,
681 concat!(
682 "Offset of field: ",
683 stringify!(_iJIT_Method_Update),
684 "::",
685 stringify!(size)
686 )
687 );
688 assert_eq!(
689 unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
690 12usize,
691 concat!(
692 "Offset of field: ",
693 stringify!(_iJIT_Method_Update),
694 "::",
695 stringify!(type_)
696 )
697 );
698 assert_eq!(
699 unsafe { ::std::ptr::addr_of!((*ptr).data_format) as usize - ptr as usize },
700 16usize,
701 concat!(
702 "Offset of field: ",
703 stringify!(_iJIT_Method_Update),
704 "::",
705 stringify!(data_format)
706 )
707 );
708}
709#[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 Profiler 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 Profiler\n does the same but it uses the latest modified version of a code region for update.\n Eventually, VTune Profiler 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"]
710pub type piJIT_Method_Update = *mut _iJIT_Method_Update;
711#[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 Profiler 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 Profiler\n does the same but it uses the latest modified version of a code region for update.\n Eventually, VTune Profiler 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"]
712pub type iJIT_Method_Update = _iJIT_Method_Update;
713extern "C" {
714 #[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."]
715 pub fn iJIT_GetNewMethodID() -> ::std::os::raw::c_uint;
716}
717extern "C" {
718 #[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."]
719 pub fn iJIT_IsProfilingActive() -> iJIT_IsProfilingActiveFlags;
720}
721extern "C" {
722 #[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) Profiler 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."]
723 pub fn iJIT_NotifyEvent(
724 event_type: iJIT_JVM_EVENT,
725 EventSpecificData: *mut ::std::os::raw::c_void,
726 ) -> ::std::os::raw::c_int;
727}