Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,473 @@
! ========================================================================
! <copyright>
! This file is provided under a dual BSD/GPLv2 license. When using or
! redistributing this file, you may do so under either license.
!
! GPL LICENSE SUMMARY
!
! Copyright (c) 2005-2017 Intel Corporation. All rights reserved.
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of version 2 of the GNU General Public License as
! published by the Free Software Foundation.
!
! This program is distributed in the hope that it will be useful, but
! WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; if not, write to the Free Software
! Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
! The full GNU General Public License is included in this distribution
! in the file called LICENSE.GPL.
!
! Contact Information:
! http://software.intel.com/en-us/articles/intel-vtune-amplifier-xe/
!
! BSD LICENSE
!
! Copyright (c) 2005-2017 Intel Corporation. All rights reserved.
! All rights reserved.
!
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions
! are met:
!
! * Redistributions of source code must retain the above copyright
! notice, this list of conditions and the following disclaimer.
! * Redistributions in binary form must reproduce the above copyright
! notice, this list of conditions and the following disclaimer in
! the documentation and/or other materials provided with the
! distribution.
! * Neither the name of Intel Corporation nor the names of its
! contributors may be used to endorse or promote products derived
! from this software without specific prior written permission.
!
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
! OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
! LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
! DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
! THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
! (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! </copyright>
! ========================================================================
!
!--------
!
! This file defines functions used by Intel(R) Parallel Inspector and
! Amplifier.
!
! Version of ittnotify that was used to generate this file.
! This is not Fortran code that can be used to check but rather a comment
! that only serves to identify the interface.
! INTEL_ITT_FORTRAN_API_VERSION 3.0
!--------
module ittnotify
use, intrinsic :: iso_c_binding, only: C_PTR, C_FUNPTR, C_INT, C_CHAR, C_NULL_CHAR, C_F_PROCPOINTER, C_LOC, C_ASSOCIATED
implicit none
!--------
!
! Public interface
!
!--------
integer, parameter :: itt_ptr = int_ptr_kind()
public :: itt_pause
public :: itt_resume
public :: itt_thread_ignore
public :: itt_suppress_push
public :: itt_suppress_pop
public :: itt_suppress_mark_range
public :: itt_suppress_clear_range
public :: itt_sync_prepare
public :: itt_sync_cancel
public :: itt_sync_acquired
public :: itt_sync_releasing
public :: itt_fsync_prepare
public :: itt_fsync_cancel
public :: itt_fsync_acquired
public :: itt_fsync_releasing
public :: itt_sync_destroy
public :: itt_sync_create
public :: itt_sync_rename
public :: itt_thread_set_name
public :: itt_heap_record_memory_growth_begin
public :: itt_heap_record_memory_growth_end
public :: itt_heap_reset_detection
public :: itt_heap_record
integer, parameter, public :: itt_attr_barrier = 1
integer, parameter, public :: itt_attr_mutex = 2
integer, parameter, public :: itt_suppress_threading_errors = 255
integer, parameter, public :: itt_suppress_memory_errors = 65280
integer, parameter, public :: itt_suppress_all_errors = 2147483647
integer, parameter, public :: itt_unsuppress_range = 0
integer, parameter, public :: itt_suppress_range = 1
integer, parameter, public :: itt_heap_leaks = 1
integer, parameter, public :: itt_heap_growth = 2
private
abstract interface
subroutine itt_proc_none() bind(C)
import
end subroutine itt_proc_none
subroutine itt_proc_sup_push(mask) bind(C)
import
integer, intent(in), value :: mask
end subroutine itt_proc_sup_push
subroutine itt_proc_sup_range(action, mask, addr, size) bind(C)
import
integer, intent(in), value :: action
integer, intent(in), value :: mask
integer(kind=itt_ptr), intent(in), value :: addr
integer(kind=itt_ptr), intent(in), value :: size
end subroutine itt_proc_sup_range
subroutine itt_proc_address(addr) bind(C)
import
integer(kind=itt_ptr), intent(in), value :: addr
end subroutine itt_proc_address
subroutine itt_proc_create(addr, objname, attribute) bind(C)
import
integer(kind=itt_ptr), intent(in), value :: addr
character(kind=C_CHAR), dimension(*), intent(in) :: objname
integer, intent(in), value :: attribute
end subroutine itt_proc_create
subroutine itt_proc_name(name) bind(C)
import
character(kind=C_CHAR), dimension(*), intent(in) :: name
end subroutine itt_proc_name
subroutine itt_proc_rename(addr, objname) bind(C)
import
integer(kind=itt_ptr), intent(in), value :: addr
character(kind=C_CHAR), dimension(*), intent(in) :: objname
end subroutine itt_proc_rename
subroutine itt_proc_heapmask(heapmask) bind(C)
import
integer, intent(in), value :: heapmask
end subroutine itt_proc_heapmask
end interface
type(C_FUNPTR) :: itt_pause_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_pause_ptr__3_0' :: itt_pause_fort_ptr
type(C_FUNPTR) :: itt_resume_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_resume_ptr__3_0' :: itt_resume_fort_ptr
type(C_FUNPTR) :: itt_thread_ignore_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_thread_ignore_ptr__3_0' :: itt_thread_ignore_fort_ptr
type(C_FUNPTR) :: itt_suppress_push_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_suppress_push_ptr__3_0' :: itt_suppress_push_fort_ptr
type(C_FUNPTR) :: itt_suppress_pop_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_suppress_pop_ptr__3_0' :: itt_suppress_pop_fort_ptr
type(C_FUNPTR) :: itt_suppress_mark_range_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_suppress_mark_range_ptr__3_0' :: itt_suppress_mark_range_fort_ptr
type(C_FUNPTR) :: itt_suppress_clear_range_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_suppress_clear_range_ptr__3_0' :: itt_suppress_clear_range_fort_ptr
type(C_FUNPTR) :: itt_sync_prepare_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_prepare_ptr__3_0' :: itt_sync_prepare_fort_ptr
type(C_FUNPTR) :: itt_sync_cancel_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_cancel_ptr__3_0' :: itt_sync_cancel_fort_ptr
type(C_FUNPTR) :: itt_sync_acquired_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_acquired_ptr__3_0' :: itt_sync_acquired_fort_ptr
type(C_FUNPTR) :: itt_sync_releasing_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_releasing_ptr__3_0' :: itt_sync_releasing_fort_ptr
type(C_FUNPTR) :: itt_fsync_prepare_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_fsync_prepare_ptr__3_0' :: itt_fsync_prepare_fort_ptr
type(C_FUNPTR) :: itt_fsync_cancel_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_fsync_cancel_ptr__3_0' :: itt_fsync_cancel_fort_ptr
type(C_FUNPTR) :: itt_fsync_acquired_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_fsync_acquired_ptr__3_0' :: itt_fsync_acquired_fort_ptr
type(C_FUNPTR) :: itt_fsync_releasing_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_fsync_releasing_ptr__3_0' :: itt_fsync_releasing_fort_ptr
type(C_FUNPTR) :: itt_sync_destroy_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_destroy_ptr__3_0' :: itt_sync_destroy_fort_ptr
type(C_FUNPTR) :: itt_sync_create_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_create_ptr__3_0' :: itt_sync_create_fort_ptr
type(C_FUNPTR) :: itt_sync_rename_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_rename_ptr__3_0' :: itt_sync_rename_fort_ptr
type(C_FUNPTR) :: itt_thread_set_name_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_thread_set_name_ptr__3_0' :: itt_thread_set_name_fort_ptr
type(C_FUNPTR) :: itt_heap_record_memory_growth_begin_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_heap_record_memory_growth_begin_ptr__3_0' :: itt_heap_record_memory_growth_begin_fort_ptr
type(C_FUNPTR) :: itt_heap_record_memory_growth_end_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_heap_record_memory_growth_end_ptr__3_0' :: itt_heap_record_memory_growth_end_fort_ptr
type(C_FUNPTR) :: itt_heap_reset_detection_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_heap_reset_detection_ptr__3_0' :: itt_heap_reset_detection_fort_ptr
type(C_FUNPTR) :: itt_heap_record_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_heap_record_ptr__3_0' :: itt_heap_record_fort_ptr
contains
subroutine itt_pause()
procedure(itt_proc_none), pointer :: pause_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_pause
if (C_ASSOCIATED(itt_pause_fort_ptr)) then
call C_F_PROCPOINTER(itt_pause_fort_ptr, pause_ptr)
call pause_ptr()
end if
end subroutine itt_pause
subroutine itt_resume()
procedure(itt_proc_none), pointer :: resume_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_resume
if (C_ASSOCIATED(itt_resume_fort_ptr)) then
call C_F_PROCPOINTER(itt_resume_fort_ptr, resume_ptr)
call resume_ptr()
end if
end subroutine itt_resume
subroutine itt_thread_ignore()
procedure(itt_proc_none), pointer :: thread_ignore_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_thread_ignore
if (C_ASSOCIATED(itt_thread_ignore_fort_ptr)) then
call C_F_PROCPOINTER(itt_thread_ignore_fort_ptr, thread_ignore_ptr)
call thread_ignore_ptr()
end if
end subroutine itt_thread_ignore
subroutine itt_suppress_push(mask)
procedure(itt_proc_sup_push), pointer :: suppress_push_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_suppress_push
integer, intent(in), value :: mask
if (C_ASSOCIATED(itt_suppress_push_fort_ptr)) then
call C_F_PROCPOINTER(itt_suppress_push_fort_ptr, suppress_push_ptr)
call suppress_push_ptr(mask)
end if
end subroutine itt_suppress_push
subroutine itt_suppress_pop()
procedure(itt_proc_none), pointer :: suppress_pop_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_suppress_pop
if (C_ASSOCIATED(itt_suppress_pop_fort_ptr)) then
call C_F_PROCPOINTER(itt_suppress_pop_fort_ptr, suppress_pop_ptr)
call suppress_pop_ptr()
end if
end subroutine itt_suppress_pop
subroutine itt_suppress_mark_range(action, mask, addr, size)
procedure(itt_proc_sup_range), pointer :: suppress_mark_range_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_suppress_mark_range
integer, intent(in), value :: action
integer, intent(in), value :: mask
integer(kind=itt_ptr), intent(in), value :: addr
integer(kind=itt_ptr), intent(in), value :: size
if (C_ASSOCIATED(itt_suppress_mark_range_fort_ptr)) then
call C_F_PROCPOINTER(itt_suppress_mark_range_fort_ptr, suppress_mark_range_ptr)
call suppress_mark_range_ptr(action, mask, addr, size)
end if
end subroutine itt_suppress_mark_range
subroutine itt_suppress_clear_range(action, mask, addr, size)
procedure(itt_proc_sup_range), pointer :: suppress_clear_range_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_suppress_clear_range
integer, intent(in), value :: action
integer, intent(in), value :: mask
integer(kind=itt_ptr), intent(in), value :: addr
integer(kind=itt_ptr), intent(in), value :: size
if (C_ASSOCIATED(itt_suppress_clear_range_fort_ptr)) then
call C_F_PROCPOINTER(itt_suppress_clear_range_fort_ptr, suppress_clear_range_ptr)
call suppress_clear_range_ptr(action, mask, addr, size)
end if
end subroutine itt_suppress_clear_range
subroutine itt_sync_prepare(addr)
procedure(itt_proc_address), pointer :: sync_prepare_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_prepare
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_sync_prepare_fort_ptr)) then
call C_F_PROCPOINTER(itt_sync_prepare_fort_ptr, sync_prepare_ptr)
call sync_prepare_ptr(addr)
end if
end subroutine itt_sync_prepare
subroutine itt_sync_cancel(addr)
procedure(itt_proc_address), pointer :: sync_cancel_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_cancel
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_sync_cancel_fort_ptr)) then
call C_F_PROCPOINTER(itt_sync_cancel_fort_ptr, sync_cancel_ptr)
call sync_cancel_ptr(addr)
end if
end subroutine itt_sync_cancel
subroutine itt_sync_acquired(addr)
procedure(itt_proc_address), pointer :: sync_acquired_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_acquired
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_sync_acquired_fort_ptr)) then
call C_F_PROCPOINTER(itt_sync_acquired_fort_ptr, sync_acquired_ptr)
call sync_acquired_ptr(addr)
end if
end subroutine itt_sync_acquired
subroutine itt_sync_releasing(addr)
procedure(itt_proc_address), pointer :: sync_releasing_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_releasing
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_sync_releasing_fort_ptr)) then
call C_F_PROCPOINTER(itt_sync_releasing_fort_ptr, sync_releasing_ptr)
call sync_releasing_ptr(addr)
end if
end subroutine itt_sync_releasing
subroutine itt_fsync_prepare(addr)
procedure(itt_proc_address), pointer :: fsync_prepare_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_fsync_prepare
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_fsync_prepare_fort_ptr)) then
call C_F_PROCPOINTER(itt_fsync_prepare_fort_ptr, fsync_prepare_ptr)
call fsync_prepare_ptr(addr)
end if
end subroutine itt_fsync_prepare
subroutine itt_fsync_cancel(addr)
procedure(itt_proc_address), pointer :: fsync_cancel_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_fsync_cancel
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_fsync_cancel_fort_ptr)) then
call C_F_PROCPOINTER(itt_fsync_cancel_fort_ptr, fsync_cancel_ptr)
call fsync_cancel_ptr(addr)
end if
end subroutine itt_fsync_cancel
subroutine itt_fsync_acquired(addr)
procedure(itt_proc_address), pointer :: fsync_acquired_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_fsync_acquired
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_fsync_acquired_fort_ptr)) then
call C_F_PROCPOINTER(itt_fsync_acquired_fort_ptr, fsync_acquired_ptr)
call fsync_acquired_ptr(addr)
end if
end subroutine itt_fsync_acquired
subroutine itt_fsync_releasing(addr)
procedure(itt_proc_address), pointer :: fsync_releasing_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_fsync_releasing
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_fsync_releasing_fort_ptr)) then
call C_F_PROCPOINTER(itt_fsync_releasing_fort_ptr, fsync_releasing_ptr)
call fsync_releasing_ptr(addr)
end if
end subroutine itt_fsync_releasing
subroutine itt_sync_destroy(addr)
procedure(itt_proc_address), pointer :: sync_destroy_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_destroy
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_sync_destroy_fort_ptr)) then
call C_F_PROCPOINTER(itt_sync_destroy_fort_ptr, sync_destroy_ptr)
call sync_destroy_ptr(addr)
end if
end subroutine itt_sync_destroy
subroutine itt_sync_create(addr, objname, attribute)
procedure(itt_proc_create), pointer :: sync_create_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_create
integer(kind=itt_ptr), intent(in), value :: addr
character(len=*), intent(in) :: objname
integer, intent(in), value :: attribute
CHARACTER(LEN=1,KIND=C_CHAR) :: objnametmp(LEN_TRIM(objname)+1)
INTEGER :: iobjname, nobjname
if (C_ASSOCIATED(itt_sync_create_fort_ptr)) then
nobjname = LEN_TRIM(objname)
DO iobjname = 1, nobjname
objnametmp(iobjname) = objname(iobjname:iobjname)
END DO
objnametmp(nobjname + 1) = C_NULL_CHAR
call C_F_PROCPOINTER(itt_sync_create_fort_ptr, sync_create_ptr)
call sync_create_ptr(addr, objnametmp, attribute)
end if
end subroutine itt_sync_create
subroutine itt_sync_rename(addr, objname)
procedure(itt_proc_rename), pointer :: sync_rename_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_rename
integer(kind=itt_ptr), intent(in), value :: addr
character(len=*), intent(in) :: objname
CHARACTER(LEN=1,KIND=C_CHAR) :: objnametmp(LEN_TRIM(objname)+1)
INTEGER :: iobjname, nobjname
if (C_ASSOCIATED(itt_sync_rename_fort_ptr)) then
nobjname = LEN_TRIM(objname)
DO iobjname = 1, nobjname
objnametmp(iobjname) = objname(iobjname:iobjname)
END DO
objnametmp(nobjname + 1) = C_NULL_CHAR
call C_F_PROCPOINTER(itt_sync_rename_fort_ptr, sync_rename_ptr)
call sync_rename_ptr(addr, objnametmp)
end if
end subroutine itt_sync_rename
subroutine itt_thread_set_name(name)
procedure(itt_proc_name), pointer :: thread_set_name_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_thread_set_name
character(len=*), intent(in) :: name
CHARACTER(LEN=1,KIND=C_CHAR) :: nametmp(LEN_TRIM(name)+1)
INTEGER :: iname, nname
if (C_ASSOCIATED(itt_thread_set_name_fort_ptr)) then
nname = LEN_TRIM(name)
DO iname = 1, nname
nametmp(iname) = name(iname:iname)
END DO
nametmp(nname + 1) = C_NULL_CHAR
call C_F_PROCPOINTER(itt_thread_set_name_fort_ptr, thread_set_name_ptr)
call thread_set_name_ptr(nametmp)
end if
end subroutine itt_thread_set_name
subroutine itt_heap_record_memory_growth_begin()
procedure(itt_proc_none), pointer :: heap_record_memory_growth_begin_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_heap_record_memory_growth_begin
if (C_ASSOCIATED(itt_heap_record_memory_growth_begin_fort_ptr)) then
call C_F_PROCPOINTER(itt_heap_record_memory_growth_begin_fort_ptr, heap_record_memory_growth_begin_ptr)
call heap_record_memory_growth_begin_ptr()
end if
end subroutine itt_heap_record_memory_growth_begin
subroutine itt_heap_record_memory_growth_end()
procedure(itt_proc_none), pointer :: heap_record_memory_growth_end_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_heap_record_memory_growth_end
if (C_ASSOCIATED(itt_heap_record_memory_growth_end_fort_ptr)) then
call C_F_PROCPOINTER(itt_heap_record_memory_growth_end_fort_ptr, heap_record_memory_growth_end_ptr)
call heap_record_memory_growth_end_ptr()
end if
end subroutine itt_heap_record_memory_growth_end
subroutine itt_heap_reset_detection(heapmask)
procedure(itt_proc_heapmask), pointer :: heap_reset_detection_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_heap_reset_detection
integer, intent(in), value :: heapmask
if (C_ASSOCIATED(itt_heap_reset_detection_fort_ptr)) then
call C_F_PROCPOINTER(itt_heap_reset_detection_fort_ptr, heap_reset_detection_ptr)
call heap_reset_detection_ptr(heapmask)
end if
end subroutine itt_heap_reset_detection
subroutine itt_heap_record(heapmask)
procedure(itt_proc_heapmask), pointer :: heap_record_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_heap_record
integer, intent(in), value :: heapmask
if (C_ASSOCIATED(itt_heap_record_fort_ptr)) then
call C_F_PROCPOINTER(itt_heap_record_fort_ptr, heap_record_ptr)
call heap_record_ptr(heapmask)
end if
end subroutine itt_heap_record
end module ittnotify

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,522 @@
! ========================================================================
! <copyright>
! This file is provided under a dual BSD/GPLv2 license. When using or
! redistributing this file, you may do so under either license.
!
! GPL LICENSE SUMMARY
!
! Copyright (c) 2005-2017 Intel Corporation. All rights reserved.
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of version 2 of the GNU General Public License as
! published by the Free Software Foundation.
!
! This program is distributed in the hope that it will be useful, but
! WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; if not, write to the Free Software
! Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
! The full GNU General Public License is included in this distribution
! in the file called LICENSE.GPL.
!
! Contact Information:
! http://software.intel.com/en-us/articles/intel-vtune-amplifier-xe/
!
! BSD LICENSE
!
! Copyright (c) 2005-2017 Intel Corporation. All rights reserved.
! All rights reserved.
!
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions
! are met:
!
! * Redistributions of source code must retain the above copyright
! notice, this list of conditions and the following disclaimer.
! * Redistributions in binary form must reproduce the above copyright
! notice, this list of conditions and the following disclaimer in
! the documentation and/or other materials provided with the
! distribution.
! * Neither the name of Intel Corporation nor the names of its
! contributors may be used to endorse or promote products derived
! from this software without specific prior written permission.
!
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
! OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
! LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
! DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
! THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
! (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! </copyright>
! ========================================================================
!
!--------
!
! This file defines functions used by Intel(R) Parallel Inspector and
! Amplifier.
!
! Version of ittnotify that was used to generate this file.
! This is not Fortran code that can be used to check but rather a comment
! that only serves to identify the interface.
! INTEL_ITT_FORTRAN_API_VERSION 3.0
!--------
module ittnotify
use, intrinsic :: iso_c_binding, only: C_PTR, C_FUNPTR, C_INT, C_CHAR, C_NULL_CHAR, C_F_PROCPOINTER, C_LOC, C_ASSOCIATED
implicit none
!--------
!
! Public interface
!
!--------
integer, parameter :: itt_ptr = int_ptr_kind()
public :: itt_pause
public :: itt_resume
public :: itt_thread_ignore
public :: itt_suppress_push
public :: itt_suppress_pop
public :: itt_suppress_mark_range
public :: itt_suppress_clear_range
public :: itt_sync_prepare
public :: itt_sync_cancel
public :: itt_sync_acquired
public :: itt_sync_releasing
public :: itt_fsync_prepare
public :: itt_fsync_cancel
public :: itt_fsync_acquired
public :: itt_fsync_releasing
public :: itt_sync_destroy
public :: itt_sync_create
public :: itt_sync_rename
public :: itt_thread_set_name
public :: itt_heap_record_memory_growth_begin
public :: itt_heap_record_memory_growth_end
public :: itt_heap_reset_detection
public :: itt_heap_record
integer, parameter, public :: itt_attr_barrier = 1
integer, parameter, public :: itt_attr_mutex = 2
integer, parameter, public :: itt_suppress_threading_errors = 255
integer, parameter, public :: itt_suppress_memory_errors = 65280
integer, parameter, public :: itt_suppress_all_errors = 2147483647
integer, parameter, public :: itt_unsuppress_range = 0
integer, parameter, public :: itt_suppress_range = 1
integer, parameter, public :: itt_heap_leaks = 1
integer, parameter, public :: itt_heap_growth = 2
private
abstract interface
subroutine itt_proc_none() bind(C)
import
end subroutine itt_proc_none
subroutine itt_proc_sup_push(mask) bind(C)
import
integer, intent(in), value :: mask
end subroutine itt_proc_sup_push
subroutine itt_proc_sup_range(action, mask, addr, size) bind(C)
import
integer, intent(in), value :: action
integer, intent(in), value :: mask
integer(kind=itt_ptr), intent(in), value :: addr
integer(kind=itt_ptr), intent(in), value :: size
end subroutine itt_proc_sup_range
subroutine itt_proc_address(addr) bind(C)
import
integer(kind=itt_ptr), intent(in), value :: addr
end subroutine itt_proc_address
subroutine itt_proc_create(addr, objname, attribute) bind(C)
import
integer(kind=itt_ptr), intent(in), value :: addr
character(kind=C_CHAR), dimension(*), intent(in) :: objname
integer, intent(in), value :: attribute
end subroutine itt_proc_create
subroutine itt_proc_name(name) bind(C)
import
character(kind=C_CHAR), dimension(*), intent(in) :: name
end subroutine itt_proc_name
subroutine itt_proc_rename(addr, objname) bind(C)
import
integer(kind=itt_ptr), intent(in), value :: addr
character(kind=C_CHAR), dimension(*), intent(in) :: objname
end subroutine itt_proc_rename
subroutine itt_proc_heapmask(heapmask) bind(C)
import
integer, intent(in), value :: heapmask
end subroutine itt_proc_heapmask
end interface
!DEC$IF DEFINED(intel64)
type(C_FUNPTR) :: itt_pause_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_pause_ptr__3_0' :: itt_pause_fort_ptr
type(C_FUNPTR) :: itt_resume_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_resume_ptr__3_0' :: itt_resume_fort_ptr
type(C_FUNPTR) :: itt_thread_ignore_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_thread_ignore_ptr__3_0' :: itt_thread_ignore_fort_ptr
type(C_FUNPTR) :: itt_suppress_push_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_suppress_push_ptr__3_0' :: itt_suppress_push_fort_ptr
type(C_FUNPTR) :: itt_suppress_pop_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_suppress_pop_ptr__3_0' :: itt_suppress_pop_fort_ptr
type(C_FUNPTR) :: itt_suppress_mark_range_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_suppress_mark_range_ptr__3_0' :: itt_suppress_mark_range_fort_ptr
type(C_FUNPTR) :: itt_suppress_clear_range_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_suppress_clear_range_ptr__3_0' :: itt_suppress_clear_range_fort_ptr
type(C_FUNPTR) :: itt_sync_prepare_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_prepare_ptr__3_0' :: itt_sync_prepare_fort_ptr
type(C_FUNPTR) :: itt_sync_cancel_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_cancel_ptr__3_0' :: itt_sync_cancel_fort_ptr
type(C_FUNPTR) :: itt_sync_acquired_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_acquired_ptr__3_0' :: itt_sync_acquired_fort_ptr
type(C_FUNPTR) :: itt_sync_releasing_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_releasing_ptr__3_0' :: itt_sync_releasing_fort_ptr
type(C_FUNPTR) :: itt_fsync_prepare_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_fsync_prepare_ptr__3_0' :: itt_fsync_prepare_fort_ptr
type(C_FUNPTR) :: itt_fsync_cancel_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_fsync_cancel_ptr__3_0' :: itt_fsync_cancel_fort_ptr
type(C_FUNPTR) :: itt_fsync_acquired_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_fsync_acquired_ptr__3_0' :: itt_fsync_acquired_fort_ptr
type(C_FUNPTR) :: itt_fsync_releasing_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_fsync_releasing_ptr__3_0' :: itt_fsync_releasing_fort_ptr
type(C_FUNPTR) :: itt_sync_destroy_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_destroy_ptr__3_0' :: itt_sync_destroy_fort_ptr
type(C_FUNPTR) :: itt_sync_create_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_createA_ptr__3_0' :: itt_sync_create_fort_ptr
type(C_FUNPTR) :: itt_sync_rename_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_sync_renameA_ptr__3_0' :: itt_sync_rename_fort_ptr
type(C_FUNPTR) :: itt_thread_set_name_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_thread_set_nameA_ptr__3_0' :: itt_thread_set_name_fort_ptr
type(C_FUNPTR) :: itt_heap_record_memory_growth_begin_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_heap_record_memory_growth_begin_ptr__3_0' :: itt_heap_record_memory_growth_begin_fort_ptr
type(C_FUNPTR) :: itt_heap_record_memory_growth_end_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_heap_record_memory_growth_end_ptr__3_0' :: itt_heap_record_memory_growth_end_fort_ptr
type(C_FUNPTR) :: itt_heap_reset_detection_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_heap_reset_detection_ptr__3_0' :: itt_heap_reset_detection_fort_ptr
type(C_FUNPTR) :: itt_heap_record_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'__itt_heap_record_ptr__3_0' :: itt_heap_record_fort_ptr
!DEC$ELSE
type(C_FUNPTR) :: itt_pause_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_pause_ptr__3_0' :: itt_pause_fort_ptr
type(C_FUNPTR) :: itt_resume_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_resume_ptr__3_0' :: itt_resume_fort_ptr
type(C_FUNPTR) :: itt_thread_ignore_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_thread_ignore_ptr__3_0' :: itt_thread_ignore_fort_ptr
type(C_FUNPTR) :: itt_suppress_push_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_suppress_push_ptr__3_0' :: itt_suppress_push_fort_ptr
type(C_FUNPTR) :: itt_suppress_pop_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_suppress_pop_ptr__3_0' :: itt_suppress_pop_fort_ptr
type(C_FUNPTR) :: itt_suppress_mark_range_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_suppress_mark_range_ptr__3_0' :: itt_suppress_mark_range_fort_ptr
type(C_FUNPTR) :: itt_suppress_clear_range_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_suppress_clear_range_ptr__3_0' :: itt_suppress_clear_range_fort_ptr
type(C_FUNPTR) :: itt_sync_prepare_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_sync_prepare_ptr__3_0' :: itt_sync_prepare_fort_ptr
type(C_FUNPTR) :: itt_sync_cancel_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_sync_cancel_ptr__3_0' :: itt_sync_cancel_fort_ptr
type(C_FUNPTR) :: itt_sync_acquired_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_sync_acquired_ptr__3_0' :: itt_sync_acquired_fort_ptr
type(C_FUNPTR) :: itt_sync_releasing_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_sync_releasing_ptr__3_0' :: itt_sync_releasing_fort_ptr
type(C_FUNPTR) :: itt_fsync_prepare_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_fsync_prepare_ptr__3_0' :: itt_fsync_prepare_fort_ptr
type(C_FUNPTR) :: itt_fsync_cancel_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_fsync_cancel_ptr__3_0' :: itt_fsync_cancel_fort_ptr
type(C_FUNPTR) :: itt_fsync_acquired_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_fsync_acquired_ptr__3_0' :: itt_fsync_acquired_fort_ptr
type(C_FUNPTR) :: itt_fsync_releasing_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_fsync_releasing_ptr__3_0' :: itt_fsync_releasing_fort_ptr
type(C_FUNPTR) :: itt_sync_destroy_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_sync_destroy_ptr__3_0' :: itt_sync_destroy_fort_ptr
type(C_FUNPTR) :: itt_sync_create_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_sync_createA_ptr__3_0' :: itt_sync_create_fort_ptr
type(C_FUNPTR) :: itt_sync_rename_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_sync_renameA_ptr__3_0' :: itt_sync_rename_fort_ptr
type(C_FUNPTR) :: itt_thread_set_name_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_thread_set_nameA_ptr__3_0' :: itt_thread_set_name_fort_ptr
type(C_FUNPTR) :: itt_heap_record_memory_growth_begin_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_heap_record_memory_growth_begin_ptr__3_0' :: itt_heap_record_memory_growth_begin_fort_ptr
type(C_FUNPTR) :: itt_heap_record_memory_growth_end_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_heap_record_memory_growth_end_ptr__3_0' :: itt_heap_record_memory_growth_end_fort_ptr
type(C_FUNPTR) :: itt_heap_reset_detection_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_heap_reset_detection_ptr__3_0' :: itt_heap_reset_detection_fort_ptr
type(C_FUNPTR) :: itt_heap_record_fort_ptr
!DEC$ ATTRIBUTES C, EXTERN, ALIAS:'___itt_heap_record_ptr__3_0' :: itt_heap_record_fort_ptr
!DEC$ENDIF
contains
subroutine itt_pause()
procedure(itt_proc_none), pointer :: pause_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_pause
if (C_ASSOCIATED(itt_pause_fort_ptr)) then
call C_F_PROCPOINTER(itt_pause_fort_ptr, pause_ptr)
call pause_ptr()
end if
end subroutine itt_pause
subroutine itt_resume()
procedure(itt_proc_none), pointer :: resume_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_resume
if (C_ASSOCIATED(itt_resume_fort_ptr)) then
call C_F_PROCPOINTER(itt_resume_fort_ptr, resume_ptr)
call resume_ptr()
end if
end subroutine itt_resume
subroutine itt_thread_ignore()
procedure(itt_proc_none), pointer :: thread_ignore_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_thread_ignore
if (C_ASSOCIATED(itt_thread_ignore_fort_ptr)) then
call C_F_PROCPOINTER(itt_thread_ignore_fort_ptr, thread_ignore_ptr)
call thread_ignore_ptr()
end if
end subroutine itt_thread_ignore
subroutine itt_suppress_push(mask)
procedure(itt_proc_sup_push), pointer :: suppress_push_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_suppress_push
integer, intent(in), value :: mask
if (C_ASSOCIATED(itt_suppress_push_fort_ptr)) then
call C_F_PROCPOINTER(itt_suppress_push_fort_ptr, suppress_push_ptr)
call suppress_push_ptr(mask)
end if
end subroutine itt_suppress_push
subroutine itt_suppress_pop()
procedure(itt_proc_none), pointer :: suppress_pop_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_suppress_pop
if (C_ASSOCIATED(itt_suppress_pop_fort_ptr)) then
call C_F_PROCPOINTER(itt_suppress_pop_fort_ptr, suppress_pop_ptr)
call suppress_pop_ptr()
end if
end subroutine itt_suppress_pop
subroutine itt_suppress_mark_range(action, mask, addr, size)
procedure(itt_proc_sup_range), pointer :: suppress_mark_range_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_suppress_mark_range
integer, intent(in), value :: action
integer, intent(in), value :: mask
integer(kind=itt_ptr), intent(in), value :: addr
integer(kind=itt_ptr), intent(in), value :: size
if (C_ASSOCIATED(itt_suppress_mark_range_fort_ptr)) then
call C_F_PROCPOINTER(itt_suppress_mark_range_fort_ptr, suppress_mark_range_ptr)
call suppress_mark_range_ptr(action, mask, addr, size)
end if
end subroutine itt_suppress_mark_range
subroutine itt_suppress_clear_range(action, mask, addr, size)
procedure(itt_proc_sup_range), pointer :: suppress_clear_range_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_suppress_clear_range
integer, intent(in), value :: action
integer, intent(in), value :: mask
integer(kind=itt_ptr), intent(in), value :: addr
integer(kind=itt_ptr), intent(in), value :: size
if (C_ASSOCIATED(itt_suppress_clear_range_fort_ptr)) then
call C_F_PROCPOINTER(itt_suppress_clear_range_fort_ptr, suppress_clear_range_ptr)
call suppress_clear_range_ptr(action, mask, addr, size)
end if
end subroutine itt_suppress_clear_range
subroutine itt_sync_prepare(addr)
procedure(itt_proc_address), pointer :: sync_prepare_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_prepare
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_sync_prepare_fort_ptr)) then
call C_F_PROCPOINTER(itt_sync_prepare_fort_ptr, sync_prepare_ptr)
call sync_prepare_ptr(addr)
end if
end subroutine itt_sync_prepare
subroutine itt_sync_cancel(addr)
procedure(itt_proc_address), pointer :: sync_cancel_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_cancel
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_sync_cancel_fort_ptr)) then
call C_F_PROCPOINTER(itt_sync_cancel_fort_ptr, sync_cancel_ptr)
call sync_cancel_ptr(addr)
end if
end subroutine itt_sync_cancel
subroutine itt_sync_acquired(addr)
procedure(itt_proc_address), pointer :: sync_acquired_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_acquired
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_sync_acquired_fort_ptr)) then
call C_F_PROCPOINTER(itt_sync_acquired_fort_ptr, sync_acquired_ptr)
call sync_acquired_ptr(addr)
end if
end subroutine itt_sync_acquired
subroutine itt_sync_releasing(addr)
procedure(itt_proc_address), pointer :: sync_releasing_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_releasing
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_sync_releasing_fort_ptr)) then
call C_F_PROCPOINTER(itt_sync_releasing_fort_ptr, sync_releasing_ptr)
call sync_releasing_ptr(addr)
end if
end subroutine itt_sync_releasing
subroutine itt_fsync_prepare(addr)
procedure(itt_proc_address), pointer :: fsync_prepare_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_fsync_prepare
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_fsync_prepare_fort_ptr)) then
call C_F_PROCPOINTER(itt_fsync_prepare_fort_ptr, fsync_prepare_ptr)
call fsync_prepare_ptr(addr)
end if
end subroutine itt_fsync_prepare
subroutine itt_fsync_cancel(addr)
procedure(itt_proc_address), pointer :: fsync_cancel_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_fsync_cancel
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_fsync_cancel_fort_ptr)) then
call C_F_PROCPOINTER(itt_fsync_cancel_fort_ptr, fsync_cancel_ptr)
call fsync_cancel_ptr(addr)
end if
end subroutine itt_fsync_cancel
subroutine itt_fsync_acquired(addr)
procedure(itt_proc_address), pointer :: fsync_acquired_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_fsync_acquired
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_fsync_acquired_fort_ptr)) then
call C_F_PROCPOINTER(itt_fsync_acquired_fort_ptr, fsync_acquired_ptr)
call fsync_acquired_ptr(addr)
end if
end subroutine itt_fsync_acquired
subroutine itt_fsync_releasing(addr)
procedure(itt_proc_address), pointer :: fsync_releasing_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_fsync_releasing
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_fsync_releasing_fort_ptr)) then
call C_F_PROCPOINTER(itt_fsync_releasing_fort_ptr, fsync_releasing_ptr)
call fsync_releasing_ptr(addr)
end if
end subroutine itt_fsync_releasing
subroutine itt_sync_destroy(addr)
procedure(itt_proc_address), pointer :: sync_destroy_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_destroy
integer(kind=itt_ptr), intent(in), value :: addr
if (C_ASSOCIATED(itt_sync_destroy_fort_ptr)) then
call C_F_PROCPOINTER(itt_sync_destroy_fort_ptr, sync_destroy_ptr)
call sync_destroy_ptr(addr)
end if
end subroutine itt_sync_destroy
subroutine itt_sync_create(addr, objname, attribute)
procedure(itt_proc_create), pointer :: sync_create_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_create
integer(kind=itt_ptr), intent(in), value :: addr
character(len=*), intent(in) :: objname
integer, intent(in), value :: attribute
CHARACTER(LEN=1,KIND=C_CHAR) :: objnametmp(LEN_TRIM(objname)+1)
INTEGER :: iobjname, nobjname
if (C_ASSOCIATED(itt_sync_create_fort_ptr)) then
nobjname = LEN_TRIM(objname)
DO iobjname = 1, nobjname
objnametmp(iobjname) = objname(iobjname:iobjname)
END DO
objnametmp(nobjname + 1) = C_NULL_CHAR
call C_F_PROCPOINTER(itt_sync_create_fort_ptr, sync_create_ptr)
call sync_create_ptr(addr, objnametmp, attribute)
end if
end subroutine itt_sync_create
subroutine itt_sync_rename(addr, objname)
procedure(itt_proc_rename), pointer :: sync_rename_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_sync_rename
integer(kind=itt_ptr), intent(in), value :: addr
character(len=*), intent(in) :: objname
CHARACTER(LEN=1,KIND=C_CHAR) :: objnametmp(LEN_TRIM(objname)+1)
INTEGER :: iobjname, nobjname
if (C_ASSOCIATED(itt_sync_rename_fort_ptr)) then
nobjname = LEN_TRIM(objname)
DO iobjname = 1, nobjname
objnametmp(iobjname) = objname(iobjname:iobjname)
END DO
objnametmp(nobjname + 1) = C_NULL_CHAR
call C_F_PROCPOINTER(itt_sync_rename_fort_ptr, sync_rename_ptr)
call sync_rename_ptr(addr, objnametmp)
end if
end subroutine itt_sync_rename
subroutine itt_thread_set_name(name)
procedure(itt_proc_name), pointer :: thread_set_name_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_thread_set_name
character(len=*), intent(in) :: name
CHARACTER(LEN=1,KIND=C_CHAR) :: nametmp(LEN_TRIM(name)+1)
INTEGER :: iname, nname
if (C_ASSOCIATED(itt_thread_set_name_fort_ptr)) then
nname = LEN_TRIM(name)
DO iname = 1, nname
nametmp(iname) = name(iname:iname)
END DO
nametmp(nname + 1) = C_NULL_CHAR
call C_F_PROCPOINTER(itt_thread_set_name_fort_ptr, thread_set_name_ptr)
call thread_set_name_ptr(nametmp)
end if
end subroutine itt_thread_set_name
subroutine itt_heap_record_memory_growth_begin()
procedure(itt_proc_none), pointer :: heap_record_memory_growth_begin_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_heap_record_memory_growth_begin
if (C_ASSOCIATED(itt_heap_record_memory_growth_begin_fort_ptr)) then
call C_F_PROCPOINTER(itt_heap_record_memory_growth_begin_fort_ptr, heap_record_memory_growth_begin_ptr)
call heap_record_memory_growth_begin_ptr()
end if
end subroutine itt_heap_record_memory_growth_begin
subroutine itt_heap_record_memory_growth_end()
procedure(itt_proc_none), pointer :: heap_record_memory_growth_end_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_heap_record_memory_growth_end
if (C_ASSOCIATED(itt_heap_record_memory_growth_end_fort_ptr)) then
call C_F_PROCPOINTER(itt_heap_record_memory_growth_end_fort_ptr, heap_record_memory_growth_end_ptr)
call heap_record_memory_growth_end_ptr()
end if
end subroutine itt_heap_record_memory_growth_end
subroutine itt_heap_reset_detection(heapmask)
procedure(itt_proc_heapmask), pointer :: heap_reset_detection_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_heap_reset_detection
integer, intent(in), value :: heapmask
if (C_ASSOCIATED(itt_heap_reset_detection_fort_ptr)) then
call C_F_PROCPOINTER(itt_heap_reset_detection_fort_ptr, heap_reset_detection_ptr)
call heap_reset_detection_ptr(heapmask)
end if
end subroutine itt_heap_reset_detection
subroutine itt_heap_record(heapmask)
procedure(itt_proc_heapmask), pointer :: heap_record_ptr
!DEC$ ATTRIBUTES DEFAULT :: itt_heap_record
integer, intent(in), value :: heapmask
if (C_ASSOCIATED(itt_heap_record_fort_ptr)) then
call C_F_PROCPOINTER(itt_heap_record_fort_ptr, heap_record_ptr)
call heap_record_ptr(heapmask)
end if
end subroutine itt_heap_record
end module ittnotify

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,642 @@
/*
Copyright (C) 2005-2019 Intel Corporation
SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause
*/
#ifndef __JITPROFILING_H__
#define __JITPROFILING_H__
/**
* @brief JIT Profiling APIs
*
* The JIT Profiling API is used to report information about just-in-time
* generated code that can be used by performance tools. The user inserts
* calls in the code generator to report information before JIT-compiled
* code goes to execution. This information is collected at runtime and used
* by tools like Intel(R) VTune(TM) Amplifier to display performance metrics
* associated with JIT-compiled code.
*
* These APIs can be used to\n
* - **Profile trace-based and method-based JIT-compiled
* code**. Some examples of environments that you can profile with these APIs:
* dynamic JIT compilation of JavaScript code traces, JIT execution in OpenCL(TM)
* software technology, Java/.NET managed execution environments, and custom
* ISV JIT engines.
* @code
* #include <jitprofiling.h>
*
* if (iJIT_IsProfilingActive != iJIT_SAMPLING_ON) {
* return;
* }
*
* iJIT_Method_Load jmethod = {0};
* jmethod.method_id = iJIT_GetNewMethodID();
* jmethod.method_name = "method_name";
* jmethod.class_file_name = "class_name";
* jmethod.source_file_name = "source_file_name";
* jmethod.method_load_address = code_addr;
* jmethod.method_size = code_size;
*
* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED, (void*)&jmethod);
* iJIT_NotifyEvent(iJVM_EVENT_TYPE_SHUTDOWN, NULL);
* @endcode
*
* * Expected behavior:
* * If any iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED event overwrites an
* already reported method, then such a method becomes invalid and its
* memory region is treated as unloaded. VTune Amplifier displays the metrics
* collected by the method until it is overwritten.
* * If supplied line number information contains multiple source lines for
* the same assembly instruction (code location), then VTune Amplifier picks up
* the first line number.
* * Dynamically generated code can be associated with a module name.
* Use the iJIT_Method_Load_V2 structure.\n
* Clarification of some cases:
* * If you register a function with the same method ID multiple times,
* specifying different module names, then the VTune Amplifier picks up
* the module name registered first. If you want to distinguish the same
* function between different JIT engines, supply different method IDs for
* each function. Other symbolic information (for example, source file)
* can be identical.
*
* - **Analyze split functions** (multiple joint or disjoint code regions
* belonging to the same function) **including re-JIT**
* with potential overlapping of code regions in time, which is common in
* resource-limited environments.
* @code
* #include <jitprofiling.h>
*
* unsigned int method_id = iJIT_GetNewMethodID();
*
* iJIT_Method_Load a = {0};
* a.method_id = method_id;
* a.method_load_address = 0x100;
* a.method_size = 0x20;
*
* iJIT_Method_Load b = {0};
* b.method_id = method_id;
* b.method_load_address = 0x200;
* b.method_size = 0x30;
*
* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED, (void*)&a);
* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED, (void*)&b);
* @endcode
*
* * Expected behaviour:
* * If a iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED event overwrites an
* already reported method, then such a method becomes invalid and
* its memory region is treated as unloaded.
* * All code regions reported with the same method ID are considered as
* belonging to the same method. Symbolic information (method name,
* source file name) will be taken from the first notification, and all
* subsequent notifications with the same method ID will be processed
* only for line number table information. So, the VTune Amplifier will map
* samples to a source line using the line number table from the current
* notification while taking the source file name from the very first one.\n
* Clarification of some cases:\n
* * If you register a second code region with a different source file
* name and the same method ID, then this information will be saved and
* will not be considered as an extension of the first code region, but
* VTune Amplifier will use the source file of the first code region and map
* performance metrics incorrectly.
* * If you register a second code region with the same source file as
* for the first region and the same method ID, then the source file will be
* discarded but VTune Amplifier will map metrics to the source file correctly.
* * If you register a second code region with a null source file and
* the same method ID, then provided line number info will be associated
* with the source file of the first code region.
*
* - **Explore inline functions** including multi-level hierarchy of
* nested inline methods which shows how performance metrics are distributed through them.
* @code
* #include <jitprofiling.h>
*
* // method_id parent_id
* // [-- c --] 3000 2000
* // [---- d -----] 2001 1000
* // [---- b ----] 2000 1000
* // [------------ a ----------------] 1000 n/a
*
* iJIT_Method_Load a = {0};
* a.method_id = 1000;
*
* iJIT_Method_Inline_Load b = {0};
* b.method_id = 2000;
* b.parent_method_id = 1000;
*
* iJIT_Method_Inline_Load c = {0};
* c.method_id = 3000;
* c.parent_method_id = 2000;
*
* iJIT_Method_Inline_Load d = {0};
* d.method_id = 2001;
* d.parent_method_id = 1000;
*
* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED, (void*)&a);
* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED, (void*)&b);
* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED, (void*)&c);
* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED, (void*)&d);
* @endcode
*
* * Requirements:
* * Each inline (iJIT_Method_Inline_Load) method should be associated
* with two method IDs: one for itself; one for its immediate parent.
* * Address regions of inline methods of the same parent method cannot
* overlap each other.
* * Execution of the parent method must not be started until it and all
* its inline methods are reported.
* * Expected behaviour:
* * In case of nested inline methods an order of
* iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED events is not important.
* * If any event overwrites either inline method or top parent method,
* then the parent, including inline methods, becomes invalid and its memory
* region is treated as unloaded.
*
* **Life time of allocated data**\n
* The client sends an event notification to the agent with event-specific
* data, which is a structure. The pointers in the structure refer to memory
* allocated by the client, which responsible for releasing it. The pointers are
* used by the iJIT_NotifyEvent method to copy client's data in a trace file,
* and they are not used after the iJIT_NotifyEvent method returns.
*/
/**
* @defgroup jitapi JIT Profiling
* @ingroup internal
* @{
*/
/**
* @brief Enumerator for the types of notifications
*/
typedef enum iJIT_jvm_event
{
iJVM_EVENT_TYPE_SHUTDOWN = 2, /**<\brief Send this to shutdown the agent.
* Use NULL for event data. */
iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED = 13, /**<\brief Send when dynamic code is
* JIT compiled and loaded into
* memory by the JIT engine, but
* before the code is executed.
* Use iJIT_Method_Load as event
* data. */
/** @cond exclude_from_documentation */
iJVM_EVENT_TYPE_METHOD_UNLOAD_START, /**<\brief Send when compiled dynamic
* code is being unloaded from memory.
* Use iJIT_Method_Load as event data.*/
/** @endcond */
iJVM_EVENT_TYPE_METHOD_UPDATE, /**<\brief Send to provide new content for
* a previously reported dynamic code.
* The previous content will be invalidated
* starting from the time of the notification.
* Use iJIT_Method_Load as event data but
* required fields are following:
* - method_id identify the code to update.
* - method_load_address specify start address
* within identified code range
* where update should be started.
* - method_size specify length of updated code
* range. */
iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED, /**<\brief Send when an inline dynamic
* code is JIT compiled and loaded
* into memory by the JIT engine,
* but before the parent code region
* starts executing.
* Use iJIT_Method_Inline_Load as event data.*/
/** @cond exclude_from_documentation */
iJVM_EVENT_TYPE_METHOD_UPDATE_V2,
/** @endcond */
iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2 = 21, /**<\brief Send when a dynamic code is
* JIT compiled and loaded into
* memory by the JIT engine, but
* before the code is executed.
* Use iJIT_Method_Load_V2 as event data. */
iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3 /**<\brief Send when a dynamic code is
* JIT compiled and loaded into
* memory by the JIT engine, but
* before the code is executed.
* Use iJIT_Method_Load_V3 as event data. */
} iJIT_JVM_EVENT;
/**
* @brief Enumerator for the agent's mode
*/
typedef enum _iJIT_IsProfilingActiveFlags
{
iJIT_NOTHING_RUNNING = 0x0000, /**<\brief The agent is not running;
* iJIT_NotifyEvent calls will
* not be processed. */
iJIT_SAMPLING_ON = 0x0001, /**<\brief The agent is running and
* ready to process notifications. */
} iJIT_IsProfilingActiveFlags;
/**
* @brief Description of a single entry in the line number information of a code region.
* @details A table of line number entries gives information about how the reported code region
* is mapped to source file.
* Intel(R) VTune(TM) Amplifier uses line number information to attribute
* the samples (virtual address) to a line number. \n
* It is acceptable to report different code addresses for the same source line:
* @code
* Offset LineNumber
* 1 2
* 12 4
* 15 2
* 18 1
* 21 30
*
* VTune Amplifier constructs the following table using the client data
*
* Code subrange Line number
* 0-1 2
* 1-12 4
* 12-15 2
* 15-18 1
* 18-21 30
* @endcode
*/
typedef struct _LineNumberInfo
{
unsigned int Offset; /**<\brief Offset from the begining of the code region. */
unsigned int LineNumber; /**<\brief Matching source line number offset (from beginning of source file). */
} *pLineNumberInfo, LineNumberInfo;
/**
* @brief Enumerator for the code architecture.
*/
typedef enum _iJIT_CodeArchitecture
{
iJIT_CA_NATIVE = 0, /**<\brief Native to the process architecture that is calling it. */
iJIT_CA_32, /**<\brief 32-bit machine code. */
iJIT_CA_64 /**<\brief 64-bit machine code. */
} iJIT_CodeArchitecture;
#pragma pack(push, 8)
/**
* @brief Description of a JIT-compiled method
* @details When you use the iJIT_Method_Load structure to describe
* the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED
* as an event type to report it.
*/
typedef struct _iJIT_Method_Load
{
unsigned int method_id; /**<\brief Unique method ID. Cannot be 0.
* You must either use the API function
* iJIT_GetNewMethodID to get a valid and unique
* method ID, or else manage ID uniqueness
* and correct range by yourself.\n
* You must use the same method ID for all code
* regions of the same method, otherwise different
* method IDs specify different methods. */
char* method_name; /**<\brief The name of the method. It can be optionally
* prefixed with its class name and appended with
* its complete signature. Can't be NULL. */
void* method_load_address; /**<\brief The start virtual address of the method code
* region. If NULL, data provided with
* event are not accepted. */
unsigned int method_size; /**<\brief The code size of the method in memory.
* If 0, then data provided with the event are not
* accepted. */
unsigned int line_number_size; /**<\brief The number of entries in the line number
* table.0 if none. */
pLineNumberInfo line_number_table; /**<\brief Pointer to the line numbers info
* array. Can be NULL if
* line_number_size is 0. See
* LineNumberInfo Structure for a
* description of a single entry in
* the line number info array */
unsigned int class_id; /**<\brief This field is obsolete. */
char* class_file_name; /**<\brief Class name. Can be NULL.*/
char* source_file_name; /**<\brief Source file name. Can be NULL.*/
} *piJIT_Method_Load, iJIT_Method_Load;
/**
* @brief Description of a JIT-compiled method
* @details When you use the iJIT_Method_Load_V2 structure to describe
* the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2
* as an event type to report it.
*/
typedef struct _iJIT_Method_Load_V2
{
unsigned int method_id; /**<\brief Unique method ID. Cannot be 0.
* You must either use the API function
* iJIT_GetNewMethodID to get a valid and unique
* method ID, or else manage ID uniqueness
* and correct range by yourself.\n
* You must use the same method ID for all code
* regions of the same method, otherwise different
* method IDs specify different methods. */
char* method_name; /**<\brief The name of the method. It can be optionally
* prefixed with its class name and appended with
* its complete signature. Can't be NULL. */
void* method_load_address; /**<\brief The start virtual address of the method code
* region. If NULL, then data provided with the
* event are not accepted. */
unsigned int method_size; /**<\brief The code size of the method in memory.
* If 0, then data provided with the event are not
* accepted. */
unsigned int line_number_size; /**<\brief The number of entries in the line number
* table. 0 if none. */
pLineNumberInfo line_number_table; /**<\brief Pointer to the line numbers info
* array. Can be NULL if
* line_number_size is 0. See
* LineNumberInfo Structure for a
* description of a single entry in
* the line number info array. */
char* class_file_name; /**<\brief Class name. Can be NULL. */
char* source_file_name; /**<\brief Source file name. Can be NULL. */
char* module_name; /**<\brief Module name. Can be NULL.
The module name can be useful for distinguishing among
different JIT engines. VTune Amplifier will display
reported methods grouped by specific module. */
} *piJIT_Method_Load_V2, iJIT_Method_Load_V2;
/**
* @brief Description of a JIT-compiled method
* @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2
* with a newly introduced 'arch' field that specifies architecture of the code region.
* When you use the iJIT_Method_Load_V3 structure to describe
* the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3
* as an event type to report it.
*/
typedef struct _iJIT_Method_Load_V3
{
unsigned int method_id; /**<\brief Unique method ID. Cannot be 0.
* You must either use the API function
* iJIT_GetNewMethodID to get a valid and unique
* method ID, or manage ID uniqueness
* and correct range by yourself.\n
* You must use the same method ID for all code
* regions of the same method, otherwise they are
* treated as regions of different methods. */
char* method_name; /**<\brief The name of the method. It can be optionally
* prefixed with its class name and appended with
* its complete signature. Cannot be NULL. */
void* method_load_address; /**<\brief The start virtual address of the method code
* region. If NULL, then data provided with the
* event are not accepted. */
unsigned int method_size; /**<\brief The code size of the method in memory.
* If 0, then data provided with the event are not
* accepted. */
unsigned int line_number_size; /**<\brief The number of entries in the line number
* table. 0 if none. */
pLineNumberInfo line_number_table; /**<\brief Pointer to the line numbers info
* array. Can be NULL if
* line_number_size is 0. See
* LineNumberInfo Structure for a
* description of a single entry in
* the line number info array. */
char* class_file_name; /**<\brief Class name. Can be NULL. */
char* source_file_name; /**<\brief Source file name. Can be NULL. */
char* module_name; /**<\brief Module name. Can be NULL.
* The module name can be useful for distinguishing among
* different JIT engines. VTune Amplifier will display
* reported methods grouped by specific module. */
iJIT_CodeArchitecture module_arch; /**<\brief Architecture of the method's code region.
* By default, it is the same as the process
* architecture that is calling it.
* For example, you can use it if your 32-bit JIT
* engine generates 64-bit code.
*
* If JIT engine reports both 32-bit and 64-bit types
* of methods then VTune Amplifier splits the methods
* with the same module name but with different
* architectures in two different modules. VTune Amplifier
* modifies the original name provided with a 64-bit method
* version by ending it with '(64)' */
} *piJIT_Method_Load_V3, iJIT_Method_Load_V3;
/**
* @brief Description of an inline JIT-compiled method
* @details When you use the_iJIT_Method_Inline_Load structure to describe
* the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED
* as an event type to report it.
*/
typedef struct _iJIT_Method_Inline_Load
{
unsigned int method_id; /**<\brief Unique method ID. Cannot be 0.
* You must either use the API function
* iJIT_GetNewMethodID to get a valid and unique
* method ID, or else manage ID uniqueness
* and correct range by yourself. */
unsigned int parent_method_id; /**<\brief Unique immediate parent's method ID.
* Cannot be 0.
* You must either use the API function
* iJIT_GetNewMethodID to get a valid and unique
* method ID, or else manage ID uniqueness
* and correct range by yourself. */
char* method_name; /**<\brief The name of the method. It can be optionally
* prefixed with its class name and appended with
* its complete signature. Can't be NULL. */
void* method_load_address; /** <\brief The virtual address on which the method
* is inlined. If NULL, then data provided with
* the event are not accepted. */
unsigned int method_size; /**<\brief The code size of the method in memory.
* If 0, then data provided with the event are not
* accepted. */
unsigned int line_number_size; /**<\brief The number of entries in the line number
* table. 0 if none. */
pLineNumberInfo line_number_table; /**<\brief Pointer to the line numbers info
* array. Can be NULL if
* line_number_size is 0. See
* LineNumberInfo Structure for a
* description of a single entry in
* the line number info array */
char* class_file_name; /**<\brief Class name. Can be NULL.*/
char* source_file_name; /**<\brief Source file name. Can be NULL.*/
} *piJIT_Method_Inline_Load, iJIT_Method_Inline_Load;
/** @cond exclude_from_documentation */
/**
* @brief Description of a segment type
* @details Use the segment type to specify a type of data supplied
* with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to
* a certain code trace.
*/
typedef enum _iJIT_SegmentType
{
iJIT_CT_UNKNOWN = 0,
iJIT_CT_CODE, /**<\brief Executable code. */
iJIT_CT_DATA, /**<\brief Data (not executable code).
* VTune Amplifier uses the format string
* (see iJIT_Method_Update) to represent
* this data in the VTune Amplifier GUI */
iJIT_CT_KEEP, /**<\brief Use the previous markup for the trace.
* Can be used for the following
* iJVM_EVENT_TYPE_METHOD_UPDATE_V2 events,
* if the type of the previously reported segment
* type is the same. */
iJIT_CT_EOF
} iJIT_SegmentType;
/**
* @brief Description of a dynamic update of the content within JIT-compiled method
* @details The JIT engine may generate the methods that are updated at runtime
* partially by mixed (data + executable code) content. When you use the iJIT_Method_Update
* structure to describe the update of the content within a JIT-compiled method,
* use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it.
*
* On the first Update event, VTune Amplifier copies the original code range reported by
* the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and
* adds the modified range to the original method. For next update events, VTune Amplifier
* does the same but it uses the latest modified version of a code region for update.
* Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by
* the iJVM_EVENT_TYPE_METHOD_LOAD event.
* Notes:
* - Multiple update events with different types for the same trace are allowed
* but they must be reported for the same code ranges.
* Example,
* @code
* [-- data---] Allowed
* [-- code --] Allowed
* [code] Ignored
* [-- data---] Allowed
* [-- code --] Allowed
* [------------ trace ---------]
* @endcode
* - The types of previously reported events can be changed but they must be reported
* for the same code ranges.
* Example,
* @code
* [-- data---] Allowed
* [-- code --] Allowed
* [-- data---] Allowed
* [-- code --] Allowed
* [------------ trace ---------]
* @endcode
*/
typedef struct _iJIT_Method_Update
{
void* load_address; /**<\brief Start address of the update within a method */
unsigned int size; /**<\brief The update size */
iJIT_SegmentType type; /**<\brief Type of the update */
const char* data_format; /**<\brief C string that contains a format string
* that follows the same specifications as format in printf.
* The format string is used for iJIT_CT_CODE only
* and cannot be NULL.
* Format can be changed on the fly. */
} *piJIT_Method_Update, iJIT_Method_Update;
/** @endcond */
#pragma pack(pop)
/** @cond exclude_from_documentation */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifndef JITAPI_CDECL
# if defined WIN32 || defined _WIN32
# define JITAPI_CDECL __cdecl
# else /* defined WIN32 || defined _WIN32 */
# if defined _M_IX86 || defined __i386__
# define JITAPI_CDECL __attribute__ ((cdecl))
# else /* _M_IX86 || __i386__ */
# define JITAPI_CDECL /* actual only on x86_64 platform */
# endif /* _M_IX86 || __i386__ */
# endif /* defined WIN32 || defined _WIN32 */
#endif /* JITAPI_CDECL */
#define JITAPI JITAPI_CDECL
/** @endcond */
/**
* @brief Generates a new unique method ID.
*
* You must use this API to obtain unique and valid method IDs for methods or
* traces reported to the agent if you don't have your own mechanism to generate
* unique method IDs.
*
* @return a new unique method ID. When out of unique method IDs, this API
* returns 0, which is not an accepted value.
*/
unsigned int JITAPI iJIT_GetNewMethodID(void);
/**
* @brief Returns the current mode of the agent.
*
* @return iJIT_SAMPLING_ON, indicating that agent is running, or
* iJIT_NOTHING_RUNNING if no agent is running.
*/
iJIT_IsProfilingActiveFlags JITAPI iJIT_IsProfilingActive(void);
/**
* @brief Reports infomation about JIT-compiled code to the agent.
*
* The reported information is used to attribute samples obtained from any
* Intel(R) VTune(TM) Amplifier collector. This API needs to be called
* after JIT compilation and before the first entry into the JIT-compiled
* code.
*
* @param[in] event_type - type of the data sent to the agent
* @param[in] EventSpecificData - pointer to event-specific data
*
* @returns 1 on success, otherwise 0.
*/
int JITAPI iJIT_NotifyEvent(iJIT_JVM_EVENT event_type, void *EventSpecificData);
#ifdef __cplusplus
}
#endif /* __cplusplus */
/** @endcond */
/** @} jitapi group */
#endif /* __JITPROFILING_H__ */

View File

@ -0,0 +1,992 @@
/*
Copyright (C) 2005-2019 Intel Corporation
SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause
*/
#ifndef _LEGACY_ITTNOTIFY_H_
#define _LEGACY_ITTNOTIFY_H_
/**
* @file
* @brief Legacy User API functions and types
*/
/** @cond exclude_from_documentation */
#ifndef ITT_OS_WIN
# define ITT_OS_WIN 1
#endif /* ITT_OS_WIN */
#ifndef ITT_OS_LINUX
# define ITT_OS_LINUX 2
#endif /* ITT_OS_LINUX */
#ifndef ITT_OS_MAC
# define ITT_OS_MAC 3
#endif /* ITT_OS_MAC */
#ifndef ITT_OS_FREEBSD
# define ITT_OS_FREEBSD 4
#endif /* ITT_OS_FREEBSD */
#ifndef ITT_OS
# if defined WIN32 || defined _WIN32
# define ITT_OS ITT_OS_WIN
# elif defined( __APPLE__ ) && defined( __MACH__ )
# define ITT_OS ITT_OS_MAC
# elif defined( __FreeBSD__ )
# define ITT_OS ITT_OS_FREEBSD
# else
# define ITT_OS ITT_OS_LINUX
# endif
#endif /* ITT_OS */
#ifndef ITT_PLATFORM_WIN
# define ITT_PLATFORM_WIN 1
#endif /* ITT_PLATFORM_WIN */
#ifndef ITT_PLATFORM_POSIX
# define ITT_PLATFORM_POSIX 2
#endif /* ITT_PLATFORM_POSIX */
#ifndef ITT_PLATFORM_MAC
# define ITT_PLATFORM_MAC 3
#endif /* ITT_PLATFORM_MAC */
#ifndef ITT_PLATFORM_FREEBSD
# define ITT_PLATFORM_FREEBSD 4
#endif /* ITT_PLATFORM_FREEBSD */
#ifndef ITT_PLATFORM
# if ITT_OS==ITT_OS_WIN
# define ITT_PLATFORM ITT_PLATFORM_WIN
# elif ITT_OS==ITT_OS_MAC
# define ITT_PLATFORM ITT_PLATFORM_MAC
# elif ITT_OS==ITT_OS_FREEBSD
# define ITT_PLATFORM ITT_PLATFORM_FREEBSD
# else
# define ITT_PLATFORM ITT_PLATFORM_POSIX
# endif
#endif /* ITT_PLATFORM */
#if defined(_UNICODE) && !defined(UNICODE)
#define UNICODE
#endif
#include <stddef.h>
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#include <tchar.h>
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#include <stdint.h>
#if defined(UNICODE) || defined(_UNICODE)
#include <wchar.h>
#endif /* UNICODE || _UNICODE */
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#ifndef ITTAPI_CDECL
# if ITT_PLATFORM==ITT_PLATFORM_WIN
# define ITTAPI_CDECL __cdecl
# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
# if defined _M_IX86 || defined __i386__
# define ITTAPI_CDECL __attribute__ ((cdecl))
# else /* _M_IX86 || __i386__ */
# define ITTAPI_CDECL /* actual only on x86 platform */
# endif /* _M_IX86 || __i386__ */
# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#endif /* ITTAPI_CDECL */
#ifndef STDCALL
# if ITT_PLATFORM==ITT_PLATFORM_WIN
# define STDCALL __stdcall
# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
# if defined _M_IX86 || defined __i386__
# define STDCALL __attribute__ ((stdcall))
# else /* _M_IX86 || __i386__ */
# define STDCALL /* supported only on x86 platform */
# endif /* _M_IX86 || __i386__ */
# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#endif /* STDCALL */
#define ITTAPI ITTAPI_CDECL
#define LIBITTAPI ITTAPI_CDECL
/* TODO: Temporary for compatibility! */
#define ITTAPI_CALL ITTAPI_CDECL
#define LIBITTAPI_CALL ITTAPI_CDECL
#if ITT_PLATFORM==ITT_PLATFORM_WIN
/* use __forceinline (VC++ specific) */
#if defined(__MINGW32__) && !defined(__cplusplus)
#define ITT_INLINE static __inline__ __attribute__((__always_inline__,__gnu_inline__))
#else
#define ITT_INLINE static __forceinline
#endif /* __MINGW32__ */
#define ITT_INLINE_ATTRIBUTE /* nothing */
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
/*
* Generally, functions are not inlined unless optimization is specified.
* For functions declared inline, this attribute inlines the function even
* if no optimization level was specified.
*/
#ifdef __STRICT_ANSI__
#define ITT_INLINE static
#define ITT_INLINE_ATTRIBUTE __attribute__((unused))
#else /* __STRICT_ANSI__ */
#define ITT_INLINE static inline
#define ITT_INLINE_ATTRIBUTE __attribute__((always_inline, unused))
#endif /* __STRICT_ANSI__ */
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
/** @endcond */
/** @cond exclude_from_documentation */
/* Helper macro for joining tokens */
#define ITT_JOIN_AUX(p,n) p##n
#define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n)
#ifdef ITT_MAJOR
#undef ITT_MAJOR
#endif
#ifdef ITT_MINOR
#undef ITT_MINOR
#endif
#define ITT_MAJOR 3
#define ITT_MINOR 0
/* Standard versioning of a token with major and minor version numbers */
#define ITT_VERSIONIZE(x) \
ITT_JOIN(x, \
ITT_JOIN(_, \
ITT_JOIN(ITT_MAJOR, \
ITT_JOIN(_, ITT_MINOR))))
#ifndef INTEL_ITTNOTIFY_PREFIX
# define INTEL_ITTNOTIFY_PREFIX __itt_
#endif /* INTEL_ITTNOTIFY_PREFIX */
#ifndef INTEL_ITTNOTIFY_POSTFIX
# define INTEL_ITTNOTIFY_POSTFIX _ptr_
#endif /* INTEL_ITTNOTIFY_POSTFIX */
#define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n)
#define ITTNOTIFY_NAME(n) ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX)))
#define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)
#define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)
#define ITTNOTIFY_VOID_D0(n,d) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d)
#define ITTNOTIFY_VOID_D1(n,d,x) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x)
#define ITTNOTIFY_VOID_D2(n,d,x,y) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y)
#define ITTNOTIFY_VOID_D3(n,d,x,y,z) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z)
#define ITTNOTIFY_VOID_D4(n,d,x,y,z,a) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a)
#define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b)
#define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c)
#define ITTNOTIFY_DATA_D0(n,d) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d)
#define ITTNOTIFY_DATA_D1(n,d,x) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x)
#define ITTNOTIFY_DATA_D2(n,d,x,y) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y)
#define ITTNOTIFY_DATA_D3(n,d,x,y,z) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z)
#define ITTNOTIFY_DATA_D4(n,d,x,y,z,a) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a)
#define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b)
#define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c)
#ifdef ITT_STUB
#undef ITT_STUB
#endif
#ifdef ITT_STUBV
#undef ITT_STUBV
#endif
#define ITT_STUBV(api,type,name,args) \
typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \
extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name);
#define ITT_STUB ITT_STUBV
/** @endcond */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* @defgroup legacy Legacy API
* @{
* @}
*/
/**
* @defgroup legacy_control Collection Control
* @ingroup legacy
* General behavior: application continues to run, but no profiling information is being collected
*
* Pausing occurs not only for the current thread but for all process as well as spawned processes
* - Intel(R) Parallel Inspector and Intel(R) Inspector XE:
* - Does not analyze or report errors that involve memory access.
* - Other errors are reported as usual. Pausing data collection in
* Intel(R) Parallel Inspector and Intel(R) Inspector XE
* only pauses tracing and analyzing memory access.
* It does not pause tracing or analyzing threading APIs.
* .
* - Intel(R) Parallel Amplifier and Intel(R) VTune(TM) Amplifier XE:
* - Does continue to record when new threads are started.
* .
* - Other effects:
* - Possible reduction of runtime overhead.
* .
* @{
*/
#ifndef _ITTNOTIFY_H_
/** @brief Pause collection */
void ITTAPI __itt_pause(void);
/** @brief Resume collection */
void ITTAPI __itt_resume(void);
/** @brief Detach collection */
void ITTAPI __itt_detach(void);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUBV(ITTAPI, void, pause, (void))
ITT_STUBV(ITTAPI, void, resume, (void))
ITT_STUBV(ITTAPI, void, detach, (void))
#define __itt_pause ITTNOTIFY_VOID(pause)
#define __itt_pause_ptr ITTNOTIFY_NAME(pause)
#define __itt_resume ITTNOTIFY_VOID(resume)
#define __itt_resume_ptr ITTNOTIFY_NAME(resume)
#define __itt_detach ITTNOTIFY_VOID(detach)
#define __itt_detach_ptr ITTNOTIFY_NAME(detach)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_pause()
#define __itt_pause_ptr 0
#define __itt_resume()
#define __itt_resume_ptr 0
#define __itt_detach()
#define __itt_detach_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_pause_ptr 0
#define __itt_resume_ptr 0
#define __itt_detach_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
#endif /* _ITTNOTIFY_H_ */
/** @} legacy_control group */
/**
* @defgroup legacy_threads Threads
* @ingroup legacy
* Threads group
* @warning Legacy API
* @{
*/
/**
* @deprecated Legacy API
* @brief Set name to be associated with thread in analysis GUI.
* @return __itt_err upon failure (name or namelen being null,name and namelen mismatched)
*/
#if ITT_PLATFORM==ITT_PLATFORM_WIN
int LIBITTAPI __itt_thr_name_setA(const char *name, int namelen);
int LIBITTAPI __itt_thr_name_setW(const wchar_t *name, int namelen);
#if defined(UNICODE) || defined(_UNICODE)
# define __itt_thr_name_set __itt_thr_name_setW
# define __itt_thr_name_set_ptr __itt_thr_name_setW_ptr
#else
# define __itt_thr_name_set __itt_thr_name_setA
# define __itt_thr_name_set_ptr __itt_thr_name_setA_ptr
#endif /* UNICODE */
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
int LIBITTAPI __itt_thr_name_set(const char *name, int namelen);
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
#if ITT_PLATFORM==ITT_PLATFORM_WIN
ITT_STUB(LIBITTAPI, int, thr_name_setA, (const char *name, int namelen))
ITT_STUB(LIBITTAPI, int, thr_name_setW, (const wchar_t *name, int namelen))
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
ITT_STUB(LIBITTAPI, int, thr_name_set, (const char *name, int namelen))
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_thr_name_setA ITTNOTIFY_DATA(thr_name_setA)
#define __itt_thr_name_setA_ptr ITTNOTIFY_NAME(thr_name_setA)
#define __itt_thr_name_setW ITTNOTIFY_DATA(thr_name_setW)
#define __itt_thr_name_setW_ptr ITTNOTIFY_NAME(thr_name_setW)
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_thr_name_set ITTNOTIFY_DATA(thr_name_set)
#define __itt_thr_name_set_ptr ITTNOTIFY_NAME(thr_name_set)
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#else /* INTEL_NO_ITTNOTIFY_API */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_thr_name_setA(name, namelen)
#define __itt_thr_name_setA_ptr 0
#define __itt_thr_name_setW(name, namelen)
#define __itt_thr_name_setW_ptr 0
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_thr_name_set(name, namelen)
#define __itt_thr_name_set_ptr 0
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_thr_name_setA_ptr 0
#define __itt_thr_name_setW_ptr 0
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_thr_name_set_ptr 0
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @deprecated Legacy API
* @brief Mark current thread as ignored from this point on, for the duration of its existence.
*/
void LIBITTAPI __itt_thr_ignore(void);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUBV(LIBITTAPI, void, thr_ignore, (void))
#define __itt_thr_ignore ITTNOTIFY_VOID(thr_ignore)
#define __itt_thr_ignore_ptr ITTNOTIFY_NAME(thr_ignore)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_thr_ignore()
#define __itt_thr_ignore_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_thr_ignore_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/** @} legacy_threads group */
/**
* @defgroup legacy_sync Synchronization
* @ingroup legacy
* Synchronization group
* @warning Legacy API
* @{
*/
/**
* @hideinitializer
* @brief possible value of attribute argument for sync object type
*/
#define __itt_attr_barrier 1
/**
* @hideinitializer
* @brief possible value of attribute argument for sync object type
*/
#define __itt_attr_mutex 2
/**
* @deprecated Legacy API
* @brief Assign a name to a sync object using char or Unicode string
* @param[in] addr - pointer to the sync object. You should use a real pointer to your object
* to make sure that the values don't clash with other object addresses
* @param[in] objtype - null-terminated object type string. If NULL is passed, the object will
* be assumed to be of generic "User Synchronization" type
* @param[in] objname - null-terminated object name string. If NULL, no name will be assigned
* to the object -- you can use the __itt_sync_rename call later to assign
* the name
* @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values which defines the
* exact semantics of how prepare/acquired/releasing calls work.
*/
#if ITT_PLATFORM==ITT_PLATFORM_WIN
void ITTAPI __itt_sync_set_nameA(void *addr, const char *objtype, const char *objname, int attribute);
void ITTAPI __itt_sync_set_nameW(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute);
#if defined(UNICODE) || defined(_UNICODE)
# define __itt_sync_set_name __itt_sync_set_nameW
# define __itt_sync_set_name_ptr __itt_sync_set_nameW_ptr
#else /* UNICODE */
# define __itt_sync_set_name __itt_sync_set_nameA
# define __itt_sync_set_name_ptr __itt_sync_set_nameA_ptr
#endif /* UNICODE */
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
void ITTAPI __itt_sync_set_name(void *addr, const char* objtype, const char* objname, int attribute);
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
#if ITT_PLATFORM==ITT_PLATFORM_WIN
ITT_STUBV(ITTAPI, void, sync_set_nameA, (void *addr, const char *objtype, const char *objname, int attribute))
ITT_STUBV(ITTAPI, void, sync_set_nameW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute))
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
ITT_STUBV(ITTAPI, void, sync_set_name, (void *addr, const char *objtype, const char *objname, int attribute))
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_sync_set_nameA ITTNOTIFY_VOID(sync_set_nameA)
#define __itt_sync_set_nameA_ptr ITTNOTIFY_NAME(sync_set_nameA)
#define __itt_sync_set_nameW ITTNOTIFY_VOID(sync_set_nameW)
#define __itt_sync_set_nameW_ptr ITTNOTIFY_NAME(sync_set_nameW)
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_sync_set_name ITTNOTIFY_VOID(sync_set_name)
#define __itt_sync_set_name_ptr ITTNOTIFY_NAME(sync_set_name)
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#else /* INTEL_NO_ITTNOTIFY_API */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_sync_set_nameA(addr, objtype, objname, attribute)
#define __itt_sync_set_nameA_ptr 0
#define __itt_sync_set_nameW(addr, objtype, objname, attribute)
#define __itt_sync_set_nameW_ptr 0
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_sync_set_name(addr, objtype, objname, attribute)
#define __itt_sync_set_name_ptr 0
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_sync_set_nameA_ptr 0
#define __itt_sync_set_nameW_ptr 0
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_sync_set_name_ptr 0
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @deprecated Legacy API
* @brief Assign a name and type to a sync object using char or Unicode string
* @param[in] addr - pointer to the sync object. You should use a real pointer to your object
* to make sure that the values don't clash with other object addresses
* @param[in] objtype - null-terminated object type string. If NULL is passed, the object will
* be assumed to be of generic "User Synchronization" type
* @param[in] objname - null-terminated object name string. If NULL, no name will be assigned
* to the object -- you can use the __itt_sync_rename call later to assign
* the name
* @param[in] typelen, namelen - a length of string for appropriate objtype and objname parameter
* @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values which defines the
* exact semantics of how prepare/acquired/releasing calls work.
* @return __itt_err upon failure (name or namelen being null,name and namelen mismatched)
*/
#if ITT_PLATFORM==ITT_PLATFORM_WIN
int LIBITTAPI __itt_notify_sync_nameA(void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute);
int LIBITTAPI __itt_notify_sync_nameW(void *addr, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute);
#if defined(UNICODE) || defined(_UNICODE)
# define __itt_notify_sync_name __itt_notify_sync_nameW
#else
# define __itt_notify_sync_name __itt_notify_sync_nameA
#endif
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
int LIBITTAPI __itt_notify_sync_name(void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute);
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
#if ITT_PLATFORM==ITT_PLATFORM_WIN
ITT_STUB(LIBITTAPI, int, notify_sync_nameA, (void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute))
ITT_STUB(LIBITTAPI, int, notify_sync_nameW, (void *addr, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute))
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
ITT_STUB(LIBITTAPI, int, notify_sync_name, (void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute))
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_notify_sync_nameA ITTNOTIFY_DATA(notify_sync_nameA)
#define __itt_notify_sync_nameA_ptr ITTNOTIFY_NAME(notify_sync_nameA)
#define __itt_notify_sync_nameW ITTNOTIFY_DATA(notify_sync_nameW)
#define __itt_notify_sync_nameW_ptr ITTNOTIFY_NAME(notify_sync_nameW)
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_notify_sync_name ITTNOTIFY_DATA(notify_sync_name)
#define __itt_notify_sync_name_ptr ITTNOTIFY_NAME(notify_sync_name)
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#else /* INTEL_NO_ITTNOTIFY_API */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_notify_sync_nameA(addr, objtype, typelen, objname, namelen, attribute)
#define __itt_notify_sync_nameA_ptr 0
#define __itt_notify_sync_nameW(addr, objtype, typelen, objname, namelen, attribute)
#define __itt_notify_sync_nameW_ptr 0
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_notify_sync_name(addr, objtype, typelen, objname, namelen, attribute)
#define __itt_notify_sync_name_ptr 0
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_notify_sync_nameA_ptr 0
#define __itt_notify_sync_nameW_ptr 0
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_notify_sync_name_ptr 0
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @deprecated Legacy API
* @brief Enter spin loop on user-defined sync object
*/
void LIBITTAPI __itt_notify_sync_prepare(void* addr);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUBV(LIBITTAPI, void, notify_sync_prepare, (void *addr))
#define __itt_notify_sync_prepare ITTNOTIFY_VOID(notify_sync_prepare)
#define __itt_notify_sync_prepare_ptr ITTNOTIFY_NAME(notify_sync_prepare)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_notify_sync_prepare(addr)
#define __itt_notify_sync_prepare_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_notify_sync_prepare_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @deprecated Legacy API
* @brief Quit spin loop without acquiring spin object
*/
void LIBITTAPI __itt_notify_sync_cancel(void *addr);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUBV(LIBITTAPI, void, notify_sync_cancel, (void *addr))
#define __itt_notify_sync_cancel ITTNOTIFY_VOID(notify_sync_cancel)
#define __itt_notify_sync_cancel_ptr ITTNOTIFY_NAME(notify_sync_cancel)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_notify_sync_cancel(addr)
#define __itt_notify_sync_cancel_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_notify_sync_cancel_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @deprecated Legacy API
* @brief Successful spin loop completion (sync object acquired)
*/
void LIBITTAPI __itt_notify_sync_acquired(void *addr);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUBV(LIBITTAPI, void, notify_sync_acquired, (void *addr))
#define __itt_notify_sync_acquired ITTNOTIFY_VOID(notify_sync_acquired)
#define __itt_notify_sync_acquired_ptr ITTNOTIFY_NAME(notify_sync_acquired)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_notify_sync_acquired(addr)
#define __itt_notify_sync_acquired_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_notify_sync_acquired_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @deprecated Legacy API
* @brief Start sync object releasing code. Is called before the lock release call.
*/
void LIBITTAPI __itt_notify_sync_releasing(void* addr);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUBV(LIBITTAPI, void, notify_sync_releasing, (void *addr))
#define __itt_notify_sync_releasing ITTNOTIFY_VOID(notify_sync_releasing)
#define __itt_notify_sync_releasing_ptr ITTNOTIFY_NAME(notify_sync_releasing)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_notify_sync_releasing(addr)
#define __itt_notify_sync_releasing_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_notify_sync_releasing_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/** @} legacy_sync group */
#ifndef _ITTNOTIFY_H_
/**
* @defgroup legacy_events Events
* @ingroup legacy
* Events group
* @{
*/
/** @brief user event type */
typedef int __itt_event;
/**
* @brief Create an event notification
* @note name or namelen being null/name and namelen not matching, user event feature not enabled
* @return non-zero event identifier upon success and __itt_err otherwise
*/
#if ITT_PLATFORM==ITT_PLATFORM_WIN
__itt_event LIBITTAPI __itt_event_createA(const char *name, int namelen);
__itt_event LIBITTAPI __itt_event_createW(const wchar_t *name, int namelen);
#if defined(UNICODE) || defined(_UNICODE)
# define __itt_event_create __itt_event_createW
# define __itt_event_create_ptr __itt_event_createW_ptr
#else
# define __itt_event_create __itt_event_createA
# define __itt_event_create_ptr __itt_event_createA_ptr
#endif /* UNICODE */
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
__itt_event LIBITTAPI __itt_event_create(const char *name, int namelen);
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
#if ITT_PLATFORM==ITT_PLATFORM_WIN
ITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char *name, int namelen))
ITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen))
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
ITT_STUB(LIBITTAPI, __itt_event, event_create, (const char *name, int namelen))
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_event_createA ITTNOTIFY_DATA(event_createA)
#define __itt_event_createA_ptr ITTNOTIFY_NAME(event_createA)
#define __itt_event_createW ITTNOTIFY_DATA(event_createW)
#define __itt_event_createW_ptr ITTNOTIFY_NAME(event_createW)
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_event_create ITTNOTIFY_DATA(event_create)
#define __itt_event_create_ptr ITTNOTIFY_NAME(event_create)
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#else /* INTEL_NO_ITTNOTIFY_API */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_event_createA(name, namelen) (__itt_event)0
#define __itt_event_createA_ptr 0
#define __itt_event_createW(name, namelen) (__itt_event)0
#define __itt_event_createW_ptr 0
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_event_create(name, namelen) (__itt_event)0
#define __itt_event_create_ptr 0
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_event_createA_ptr 0
#define __itt_event_createW_ptr 0
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_event_create_ptr 0
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @brief Record an event occurrence.
* @return __itt_err upon failure (invalid event id/user event feature not enabled)
*/
int LIBITTAPI __itt_event_start(__itt_event event);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUB(LIBITTAPI, int, event_start, (__itt_event event))
#define __itt_event_start ITTNOTIFY_DATA(event_start)
#define __itt_event_start_ptr ITTNOTIFY_NAME(event_start)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_event_start(event) (int)0
#define __itt_event_start_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_event_start_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @brief Record an event end occurrence.
* @note It is optional if events do not have durations.
* @return __itt_err upon failure (invalid event id/user event feature not enabled)
*/
int LIBITTAPI __itt_event_end(__itt_event event);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUB(LIBITTAPI, int, event_end, (__itt_event event))
#define __itt_event_end ITTNOTIFY_DATA(event_end)
#define __itt_event_end_ptr ITTNOTIFY_NAME(event_end)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_event_end(event) (int)0
#define __itt_event_end_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_event_end_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/** @} legacy_events group */
#endif /* _ITTNOTIFY_H_ */
/**
* @defgroup legacy_memory Memory Accesses
* @ingroup legacy
*/
/**
* @deprecated Legacy API
* @brief Inform the tool of memory accesses on reading
*/
void LIBITTAPI __itt_memory_read(void *addr, size_t size);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUBV(LIBITTAPI, void, memory_read, (void *addr, size_t size))
#define __itt_memory_read ITTNOTIFY_VOID(memory_read)
#define __itt_memory_read_ptr ITTNOTIFY_NAME(memory_read)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_memory_read(addr, size)
#define __itt_memory_read_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_memory_read_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @deprecated Legacy API
* @brief Inform the tool of memory accesses on writing
*/
void LIBITTAPI __itt_memory_write(void *addr, size_t size);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUBV(LIBITTAPI, void, memory_write, (void *addr, size_t size))
#define __itt_memory_write ITTNOTIFY_VOID(memory_write)
#define __itt_memory_write_ptr ITTNOTIFY_NAME(memory_write)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_memory_write(addr, size)
#define __itt_memory_write_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_memory_write_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @deprecated Legacy API
* @brief Inform the tool of memory accesses on updating
*/
void LIBITTAPI __itt_memory_update(void *address, size_t size);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUBV(LIBITTAPI, void, memory_update, (void *addr, size_t size))
#define __itt_memory_update ITTNOTIFY_VOID(memory_update)
#define __itt_memory_update_ptr ITTNOTIFY_NAME(memory_update)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_memory_update(addr, size)
#define __itt_memory_update_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_memory_update_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/** @} legacy_memory group */
/**
* @defgroup legacy_state Thread and Object States
* @ingroup legacy
*/
/** @brief state type */
typedef int __itt_state_t;
/** @cond exclude_from_documentation */
typedef enum __itt_obj_state {
__itt_obj_state_err = 0,
__itt_obj_state_clr = 1,
__itt_obj_state_set = 2,
__itt_obj_state_use = 3
} __itt_obj_state_t;
typedef enum __itt_thr_state {
__itt_thr_state_err = 0,
__itt_thr_state_clr = 1,
__itt_thr_state_set = 2
} __itt_thr_state_t;
typedef enum __itt_obj_prop {
__itt_obj_prop_watch = 1,
__itt_obj_prop_ignore = 2,
__itt_obj_prop_sharable = 3
} __itt_obj_prop_t;
typedef enum __itt_thr_prop {
__itt_thr_prop_quiet = 1
} __itt_thr_prop_t;
/** @endcond */
/**
* @deprecated Legacy API
* @brief managing thread and object states
*/
__itt_state_t LIBITTAPI __itt_state_get(void);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUB(ITTAPI, __itt_state_t, state_get, (void))
#define __itt_state_get ITTNOTIFY_DATA(state_get)
#define __itt_state_get_ptr ITTNOTIFY_NAME(state_get)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_state_get(void) (__itt_state_t)0
#define __itt_state_get_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_state_get_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @deprecated Legacy API
* @brief managing thread and object states
*/
__itt_state_t LIBITTAPI __itt_state_set(__itt_state_t s);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUB(ITTAPI, __itt_state_t, state_set, (__itt_state_t s))
#define __itt_state_set ITTNOTIFY_DATA(state_set)
#define __itt_state_set_ptr ITTNOTIFY_NAME(state_set)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_state_set(s) (__itt_state_t)0
#define __itt_state_set_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_state_set_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @deprecated Legacy API
* @brief managing thread and object modes
*/
__itt_thr_state_t LIBITTAPI __itt_thr_mode_set(__itt_thr_prop_t p, __itt_thr_state_t s);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUB(ITTAPI, __itt_thr_state_t, thr_mode_set, (__itt_thr_prop_t p, __itt_thr_state_t s))
#define __itt_thr_mode_set ITTNOTIFY_DATA(thr_mode_set)
#define __itt_thr_mode_set_ptr ITTNOTIFY_NAME(thr_mode_set)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_thr_mode_set(p, s) (__itt_thr_state_t)0
#define __itt_thr_mode_set_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_thr_mode_set_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/**
* @deprecated Legacy API
* @brief managing thread and object modes
*/
__itt_obj_state_t LIBITTAPI __itt_obj_mode_set(__itt_obj_prop_t p, __itt_obj_state_t s);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUB(ITTAPI, __itt_obj_state_t, obj_mode_set, (__itt_obj_prop_t p, __itt_obj_state_t s))
#define __itt_obj_mode_set ITTNOTIFY_DATA(obj_mode_set)
#define __itt_obj_mode_set_ptr ITTNOTIFY_NAME(obj_mode_set)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_obj_mode_set(p, s) (__itt_obj_state_t)0
#define __itt_obj_mode_set_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_obj_mode_set_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/** @} legacy_state group */
/**
* @defgroup frames Frames
* @ingroup legacy
* Frames group
* @{
*/
/**
* @brief opaque structure for frame identification
*/
typedef struct __itt_frame_t *__itt_frame;
/**
* @brief Create a global frame with given domain
*/
#if ITT_PLATFORM==ITT_PLATFORM_WIN
__itt_frame ITTAPI __itt_frame_createA(const char *domain);
__itt_frame ITTAPI __itt_frame_createW(const wchar_t *domain);
#if defined(UNICODE) || defined(_UNICODE)
# define __itt_frame_create __itt_frame_createW
# define __itt_frame_create_ptr __itt_frame_createW_ptr
#else /* UNICODE */
# define __itt_frame_create __itt_frame_createA
# define __itt_frame_create_ptr __itt_frame_createA_ptr
#endif /* UNICODE */
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
__itt_frame ITTAPI __itt_frame_create(const char *domain);
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
#if ITT_PLATFORM==ITT_PLATFORM_WIN
ITT_STUB(ITTAPI, __itt_frame, frame_createA, (const char *domain))
ITT_STUB(ITTAPI, __itt_frame, frame_createW, (const wchar_t *domain))
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
ITT_STUB(ITTAPI, __itt_frame, frame_create, (const char *domain))
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_frame_createA ITTNOTIFY_DATA(frame_createA)
#define __itt_frame_createA_ptr ITTNOTIFY_NAME(frame_createA)
#define __itt_frame_createW ITTNOTIFY_DATA(frame_createW)
#define __itt_frame_createW_ptr ITTNOTIFY_NAME(frame_createW)
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_frame_create ITTNOTIFY_DATA(frame_create)
#define __itt_frame_create_ptr ITTNOTIFY_NAME(frame_create)
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#else /* INTEL_NO_ITTNOTIFY_API */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_frame_createA(domain)
#define __itt_frame_createA_ptr 0
#define __itt_frame_createW(domain)
#define __itt_frame_createW_ptr 0
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_frame_create(domain)
#define __itt_frame_create_ptr 0
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#if ITT_PLATFORM==ITT_PLATFORM_WIN
#define __itt_frame_createA_ptr 0
#define __itt_frame_createW_ptr 0
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#define __itt_frame_create_ptr 0
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/** @brief Record a frame begin occurrence. */
void ITTAPI __itt_frame_begin(__itt_frame frame);
/** @brief Record a frame end occurrence. */
void ITTAPI __itt_frame_end (__itt_frame frame);
/** @cond exclude_from_documentation */
#ifndef INTEL_NO_MACRO_BODY
#ifndef INTEL_NO_ITTNOTIFY_API
ITT_STUBV(ITTAPI, void, frame_begin, (__itt_frame frame))
ITT_STUBV(ITTAPI, void, frame_end, (__itt_frame frame))
#define __itt_frame_begin ITTNOTIFY_VOID(frame_begin)
#define __itt_frame_begin_ptr ITTNOTIFY_NAME(frame_begin)
#define __itt_frame_end ITTNOTIFY_VOID(frame_end)
#define __itt_frame_end_ptr ITTNOTIFY_NAME(frame_end)
#else /* INTEL_NO_ITTNOTIFY_API */
#define __itt_frame_begin(frame)
#define __itt_frame_begin_ptr 0
#define __itt_frame_end(frame)
#define __itt_frame_end_ptr 0
#endif /* INTEL_NO_ITTNOTIFY_API */
#else /* INTEL_NO_MACRO_BODY */
#define __itt_frame_begin_ptr 0
#define __itt_frame_end_ptr 0
#endif /* INTEL_NO_MACRO_BODY */
/** @endcond */
/** @} frames group */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _LEGACY_ITTNOTIFY_H_ */

View File

@ -0,0 +1,19 @@
/*
Copyright (C) 2005-2019 Intel Corporation
SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause
*/
#ifndef _LIBITTNOTIFY_H_
#define _LIBITTNOTIFY_H_
#ifndef __ITT_INTERNAL_INCLUDE
# if defined WIN32 || defined _WIN32
# pragma message("WARNING!!! Include file libittnotify.h is deprecated and should not be included anymore")
# else /* WIN32 */
# warning "Include file libittnotify.h is deprecated and should not be included anymore"
# endif /* WIN32 */
#endif /* __ITT_INTERNAL_INCLUDE */
#include "legacy/ittnotify.h"
#endif /* _LIBITTNOTIFY_H_ */