From b71f28a1cf5e98a45f7d1df3a106eb946574302b Mon Sep 17 00:00:00 2001 From: "Parshutin, Eugeny" Date: Tue, 2 Jun 2026 10:46:39 -0500 Subject: [PATCH 01/12] drop 32bit support --- CMakeLists.txt | 31 +- buildall.py | 102 ++--- python/setup.py | 8 +- src/ittnotify/ittptmark32.S | 717 ---------------------------------- src/ittnotify/ittptmark32.asm | 201 ---------- 5 files changed, 49 insertions(+), 1010 deletions(-) delete mode 100644 src/ittnotify/ittptmark32.S delete mode 100644 src/ittnotify/ittptmark32.asm diff --git a/CMakeLists.txt b/CMakeLists.txt index bf9dd451..86b8fa0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,28 +23,12 @@ endif() project(ittapi) -option(FORCE_32 "Force a 32-bit compile on 64-bit" OFF) option(ITT_API_IPT_SUPPORT "ptmarks support" OFF) option(ITT_API_FORTRAN_SUPPORT "fortran support" OFF) option(ITT_API_CPP_SUPPORT "C++ wrapper support" OFF) option(ITT_API_REFERENCE_COLLECTOR "Build reference collector shared library" OFF) option(ITT_API_INSTALL "Enable ITT API installation rules" ON) -if(FORCE_32 AND UNIX) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") -endif() - -if(CMAKE_SIZEOF_VOID_P MATCHES "8" AND NOT(FORCE_32)) - set(ARCH_64 ON) -endif() - -if(FORCE_32 AND ITT_API_FORTRAN_SUPPORT) - # ifx dropped 32-bit support - message(WARNING "Fortran support for 32-bit has been discontinued") - set(ITT_API_FORTRAN_SUPPORT OFF) -endif() - if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$") # override default -O3 string(REPLACE "-O3" "-O2" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") @@ -75,20 +59,11 @@ if(ITT_API_IPT_SUPPORT) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DITT_API_IPT_SUPPORT") if(NOT WIN32) enable_language(ASM) - if(ARCH_64) - set(ITT_PT src/ittnotify/ittptmark64.S) - else() - set(ASM_OPTIONS "-m32") - set(ITT_PT src/ittnotify/ittptmark32.S) - endif() - set(CMAKE_ASM_FLAGS "${CFLAGS} ${ASM_OPTIONS}") + set(ITT_PT src/ittnotify/ittptmark64.S) + set(CMAKE_ASM_FLAGS "${CFLAGS}") else() enable_language(ASM_MASM) - if(ARCH_64) - set(ITT_PT src/ittnotify/ittptmark64.asm) - else() - set(ITT_PT src/ittnotify/ittptmark32.asm) - endif() + set(ITT_PT src/ittnotify/ittptmark64.asm) endif() endif() diff --git a/buildall.py b/buildall.py index a68a6795..03452986 100755 --- a/buildall.py +++ b/buildall.py @@ -121,8 +121,6 @@ def main(): "-cpp", "--cpp", help="enable C++ wrapper support", action="store_true") parser.add_argument( "--refcol", help="enable reference collector build", action="store_true") - parser.add_argument( - "--force_bits", choices=["32", "64"], help="specify bit version for the target") if sys.platform == 'win32' and vs_versions: parser.add_argument( "--vs", help="specify visual studio version {default}", choices=vs_versions, default=vs_versions[0]) @@ -130,70 +128,56 @@ def main(): "--cmake_gen", choices=["vs", "ninja"], help="specify cmake build generator") args = parser.parse_args() - if args.force_bits: - target_bits = [args.force_bits] - else: - target_bits = ['64'] - if (sys.platform != 'darwin'): # on MAC OSX we produce FAT library including both 32 and 64 bits - target_bits.append('32') - - print("target_bits", target_bits) work_dir = os.getcwd() if args.clean: bin_dir = os.path.join(work_dir, 'bin') if os.path.exists(bin_dir): shutil.rmtree(bin_dir) - for bits in target_bits: - work_folder = os.path.join( - work_dir, "build_" + (sys.platform.replace('32', "")), bits) - already_there = os.path.exists(work_folder) - if already_there and args.clean: - shutil.rmtree(work_folder) - already_there = False - if not already_there: - os.makedirs(work_folder) - print("work_folder: ", work_folder) - os.chdir(work_folder) - if args.clean: - continue - - cmake = detect_cmake() - if not cmake: - print("Error: cmake is not found") - return - - if sys.platform == 'win32': - # ninja does not support platform bit specification - use_ninja = args.cmake_gen == 'ninja' and bits =='64' - if vs_versions and not use_ninja: - generator = 'Visual Studio {}'.format(args.vs) - generator_args = '-A {}'.format('x64' if bits == - '64' else 'Win32') - else: - generator = 'Ninja' - generator_args = '' - else: - generator = 'Unix Makefiles' - generator_args = '' - run_shell('%s "%s" -G"%s" %s %s' % (cmake, work_dir, generator, generator_args, " ".join([ - ("-DFORCE_32=ON" if bits == '32' else ""), - ("-DCMAKE_BUILD_TYPE=Debug" if args.debug else ""), - ('-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' if args.verbose else ''), - ("-DITT_API_IPT_SUPPORT=1" if args.ptmark else ""), - ("-DITT_API_FORTRAN_SUPPORT=1" if args.fortran else ""), - ("-DITT_API_CPP_SUPPORT=ON" if args.cpp else ""), - ("-DITT_API_REFERENCE_COLLECTOR=ON" if args.refcol else ""), - ]))) - - if sys.platform == 'win32': - target_project = 'ALL_BUILD' if not use_ninja else 'all' - run_shell('%s --build . --config %s --target %s' % - (cmake, ('Debug' if args.debug else 'Release'), target_project)) + work_folder = os.path.join( + work_dir, "build_" + sys.platform.replace('32', "")) + already_there = os.path.exists(work_folder) + if already_there and args.clean: + shutil.rmtree(work_folder) + already_there = False + if not already_there: + os.makedirs(work_folder) + print("work_folder: ", work_folder) + os.chdir(work_folder) + + cmake = detect_cmake() + if not cmake: + print("Error: cmake is not found") + return + + if sys.platform == 'win32': + use_ninja = args.cmake_gen == 'ninja' + if vs_versions and not use_ninja: + generator = 'Visual Studio {}'.format(args.vs) + generator_args = '-A x64' else: - import glob - run_shell('%s --build . --config %s' % - (cmake, ('Debug' if args.debug else 'Release'))) + generator = 'Ninja' + generator_args = '' + else: + generator = 'Unix Makefiles' + generator_args = '' + + run_shell('%s "%s" -G"%s" %s %s' % (cmake, work_dir, generator, generator_args, " ".join([ + ("-DCMAKE_BUILD_TYPE=Debug" if args.debug else ""), + ('-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' if args.verbose else ''), + ("-DITT_API_IPT_SUPPORT=1" if args.ptmark else ""), + ("-DITT_API_FORTRAN_SUPPORT=1" if args.fortran else ""), + ("-DITT_API_CPP_SUPPORT=ON" if args.cpp else ""), + ("-DITT_API_REFERENCE_COLLECTOR=ON" if args.refcol else ""), + ]))) + + if sys.platform == 'win32': + target_project = 'ALL_BUILD' if not use_ninja else 'all' + run_shell('%s --build . --config %s --target %s' % + (cmake, ('Debug' if args.debug else 'Release'), target_project)) + else: + run_shell('%s --build . --config %s' % + (cmake, ('Debug' if args.debug else 'Release'))) if __name__ == "__main__": diff --git a/python/setup.py b/python/setup.py index 450845d5..cf03b8b8 100644 --- a/python/setup.py +++ b/python/setup.py @@ -21,8 +21,6 @@ def get_environment_flag(name): return (flag_value and flag_value.lower() not in ('0', 'n', 'no', 'false')) if flag_value is not None else None -IS_64_ARCHITECTURE = sys.maxsize > 2 ** 32 - # Check if custom location for ITT API source code is specified ITT_DEFAULT_DIR = '../' itt_dir = os.environ.get('ITTAPI_ITT_API_SOURCE_DIR', None) @@ -51,9 +49,9 @@ def get_environment_flag(name): if build_itt_with_ipt_support: itt_compiler_flags = ['-DITT_API_IPT_SUPPORT'] if sys.platform == 'win32': - ITT_PTMARK_SOURCE = 'ittptmark64.asm' if IS_64_ARCHITECTURE else 'ittptmark32.asm' + ITT_PTMARK_SOURCE = 'ittptmark64.asm' else: - ITT_PTMARK_SOURCE = 'ittptmark64.S' if IS_64_ARCHITECTURE else 'ittptmark32.S' + ITT_PTMARK_SOURCE = 'ittptmark64.S' itt_extra_objects = [os.path.join(itt_dir, 'src', 'ittnotify', ITT_PTMARK_SOURCE)] else: itt_compiler_flags = [] @@ -94,7 +92,7 @@ def build_extension(self, ext) -> None: """ if ext.name == 'ittapi.native' and self.compiler.compiler_type == 'msvc': # Setup asm tool - as_tool = 'ml64.exe' if IS_64_ARCHITECTURE else 'ml.exe' + as_tool = 'ml64.exe' as_ext = '.asm' if hasattr(self.compiler, 'initialized') and hasattr(self.compiler, 'initialize'): diff --git a/src/ittnotify/ittptmark32.S b/src/ittnotify/ittptmark32.S deleted file mode 100644 index f8ee3c16..00000000 --- a/src/ittnotify/ittptmark32.S +++ /dev/null @@ -1,717 +0,0 @@ -/* - Copyright (C) 2017-2025 Intel Corporation - - SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause -*/ - - -// ///////////////////////////////////////////////////////////////////////// -////// Intel Processor Trace Marker Functionality -//////////////////////////////////////////////////////////////////////////// - - .text - .align 16 - .globl __itt_pt_mark - .globl __itt_pt_event - .globl __itt_pt_mark_event - .globl __itt_pt_mark_threshold - .globl __itt_pt_byte - .globl __itt_pt_write - -/// void __itt_pt_mark(unsigned char index); -__itt_pt_mark: - movzbl 4(%esp), %eax -// and $0xff, %eax - lea __itt_pt_mark_call_table(,%eax,4), %eax - jmp *%eax - .align 4 - - .long 0, 1, 2, 3 // GUID - .long 0xfadefade - -__itt_pt_mark_call_table: -/// .fill 256,4,(0x0000c2c3 | (( . - __itt_pt_mark_call_table) << 14)) - ret - ret $0x0 - ret - ret $0x1 - ret - ret $0x2 - ret - ret $0x3 - ret - ret $0x4 - ret - ret $0x5 - ret - ret $0x6 - ret - ret $0x7 - ret - ret $0x8 - ret - ret $0x9 - ret - ret $0xa - ret - ret $0xb - ret - ret $0xc - ret - ret $0xd - ret - ret $0xe - ret - ret $0xf - - ret - ret $0x10 - ret - ret $0x11 - ret - ret $0x12 - ret - ret $0x13 - ret - ret $0x14 - ret - ret $0x15 - ret - ret $0x16 - ret - ret $0x17 - ret - ret $0x18 - ret - ret $0x19 - ret - ret $0x1a - ret - ret $0x1b - ret - ret $0x1c - ret - ret $0x1d - ret - ret $0x1e - ret - ret $0x1f - - ret - ret $0x20 - ret - ret $0x21 - ret - ret $0x22 - ret - ret $0x23 - ret - ret $0x24 - ret - ret $0x25 - ret - ret $0x26 - ret - ret $0x27 - ret - ret $0x28 - ret - ret $0x29 - ret - ret $0x2a - ret - ret $0x2b - ret - ret $0x2c - ret - ret $0x2d - ret - ret $0x2e - ret - ret $0x2f - - ret - ret $0x30 - ret - ret $0x31 - ret - ret $0x32 - ret - ret $0x33 - ret - ret $0x34 - ret - ret $0x35 - ret - ret $0x36 - ret - ret $0x37 - ret - ret $0x38 - ret - ret $0x39 - ret - ret $0x3a - ret - ret $0x3b - ret - ret $0x3c - ret - ret $0x3d - ret - ret $0x3e - ret - ret $0x3f - - ret - ret $0x40 - ret - ret $0x41 - ret - ret $0x42 - ret - ret $0x43 - ret - ret $0x44 - ret - ret $0x45 - ret - ret $0x46 - ret - ret $0x47 - ret - ret $0x48 - ret - ret $0x49 - ret - ret $0x4a - ret - ret $0x4b - ret - ret $0x4c - ret - ret $0x4d - ret - ret $0x4e - ret - ret $0x4f - - ret - ret $0x50 - ret - ret $0x51 - ret - ret $0x52 - ret - ret $0x53 - ret - ret $0x54 - ret - ret $0x55 - ret - ret $0x56 - ret - ret $0x57 - ret - ret $0x58 - ret - ret $0x59 - ret - ret $0x5a - ret - ret $0x5b - ret - ret $0x5c - ret - ret $0x5d - ret - ret $0x5e - ret - ret $0x5f - - ret - ret $0x60 - ret - ret $0x61 - ret - ret $0x62 - ret - ret $0x63 - ret - ret $0x64 - ret - ret $0x65 - ret - ret $0x66 - ret - ret $0x67 - ret - ret $0x68 - ret - ret $0x69 - ret - ret $0x6a - ret - ret $0x6b - ret - ret $0x6c - ret - ret $0x6d - ret - ret $0x6e - ret - ret $0x6f - - ret - ret $0x70 - ret - ret $0x71 - ret - ret $0x72 - ret - ret $0x73 - ret - ret $0x74 - ret - ret $0x75 - ret - ret $0x76 - ret - ret $0x77 - ret - ret $0x78 - ret - ret $0x79 - ret - ret $0x7a - ret - ret $0x7b - ret - ret $0x7c - ret - ret $0x7d - ret - ret $0x7e - ret - ret $0x7f - - ret - ret $0x80 - ret - ret $0x81 - ret - ret $0x82 - ret - ret $0x83 - ret - ret $0x84 - ret - ret $0x85 - ret - ret $0x86 - ret - ret $0x87 - ret - ret $0x88 - ret - ret $0x89 - ret - ret $0x8a - ret - ret $0x8b - ret - ret $0x8c - ret - ret $0x8d - ret - ret $0x8e - ret - ret $0x8f - - ret - ret $0x90 - ret - ret $0x91 - ret - ret $0x92 - ret - ret $0x93 - ret - ret $0x94 - ret - ret $0x95 - ret - ret $0x96 - ret - ret $0x97 - ret - ret $0x98 - ret - ret $0x99 - ret - ret $0x9a - ret - ret $0x9b - ret - ret $0x9c - ret - ret $0x9d - ret - ret $0x9e - ret - ret $0x9f - - ret - ret $0xa0 - ret - ret $0xa1 - ret - ret $0xa2 - ret - ret $0xa3 - ret - ret $0xa4 - ret - ret $0xa5 - ret - ret $0xa6 - ret - ret $0xa7 - ret - ret $0xa8 - ret - ret $0xa9 - ret - ret $0xaa - ret - ret $0xab - ret - ret $0xac - ret - ret $0xad - ret - ret $0xae - ret - ret $0xaf - - ret - ret $0xb0 - ret - ret $0xb1 - ret - ret $0xb2 - ret - ret $0xb3 - ret - ret $0xb4 - ret - ret $0xb5 - ret - ret $0xb6 - ret - ret $0xb7 - ret - ret $0xb8 - ret - ret $0xb9 - ret - ret $0xba - ret - ret $0xbb - ret - ret $0xbc - ret - ret $0xbd - ret - ret $0xbe - ret - ret $0xbf - - ret - ret $0xc0 - ret - ret $0xc1 - ret - ret $0xc2 - ret - ret $0xc3 - ret - ret $0xc4 - ret - ret $0xc5 - ret - ret $0xc6 - ret - ret $0xc7 - ret - ret $0xc8 - ret - ret $0xc9 - ret - ret $0xca - ret - ret $0xcb - ret - ret $0xcc - ret - ret $0xcd - ret - ret $0xce - ret - ret $0xcf - - ret - ret $0xd0 - ret - ret $0xd1 - ret - ret $0xd2 - ret - ret $0xd3 - ret - ret $0xd4 - ret - ret $0xd5 - ret - ret $0xd6 - ret - ret $0xd7 - ret - ret $0xd8 - ret - ret $0xd9 - ret - ret $0xda - ret - ret $0xdb - ret - ret $0xdc - ret - ret $0xdd - ret - ret $0xde - ret - ret $0xdf - - ret - ret $0xe0 - ret - ret $0xe1 - ret - ret $0xe2 - ret - ret $0xe3 - ret - ret $0xe4 - ret - ret $0xe5 - ret - ret $0xe6 - ret - ret $0xe7 - ret - ret $0xe8 - ret - ret $0xe9 - ret - ret $0xea - ret - ret $0xeb - ret - ret $0xec - ret - ret $0xed - ret - ret $0xee - ret - ret $0xef - - ret - ret $0xf0 - ret - ret $0xf1 - ret - ret $0xf2 - ret - ret $0xf3 - ret - ret $0xf4 - ret - ret $0xf5 - ret - ret $0xf6 - ret - ret $0xf7 - ret - ret $0xf8 - ret - ret $0xf9 - ret - ret $0xfa - ret - ret $0xfb - ret - ret $0xfc - ret - ret $0xfd - ret - ret $0xfe - ret - ret $0xff - - .align 16 - -__itt_pt_byte: - - movl 4(%esp), %ecx - -__itt_pt_byte_: - - and $0xff, %ecx - lea __itt_pt_byte_call_table(,%ecx,1), %ecx - jmp *%ecx - - .align 4 - - .long 0, 1, 2, 3 // GUID - .long 0xfadedeaf - -__itt_pt_byte_call_table: - - .fill 256,1,0xc3 - - .align 16 - -__itt_pt_event: - - push %ecx - mov 8(%esp), %ecx - rdpmc - - mov %al,%cl - call __itt_pt_byte_ - shr $8,%eax - mov %al,%cl - call __itt_pt_byte_ - shr $8,%eax - mov %al,%cl - call __itt_pt_byte_ - shr $8,%eax - mov %al,%cl - call __itt_pt_byte_ - - mov %dl,%cl - call __itt_pt_byte_ - shr $8,%edx - mov %dl,%cl - call __itt_pt_byte_ - shr $8,%edx - mov %dl,%cl - call __itt_pt_byte_ - shr $8,%edx - mov %dl,%cl - call __itt_pt_byte_ - - pop %ecx - ret - - .align 16 - -__itt_pt_mark_event: - - testl $1,4(%esp) - jnz odd - pushl $0 - call __itt_pt_event - add $2,%esp - jmp __itt_pt_mark - -odd: - pushl 4(%esp) - call __itt_pt_mark - add $2,%esp - movl $0,4(%esp) - jmp __itt_pt_event - - - .align 16 - -__itt_pt_flush: - - lea __itt_pt_mark_flush_1,%eax - jmp *%eax - - .align 16 - nop -__itt_pt_mark_flush_1: - lea __itt_pt_mark_flush_2,%eax - jmp *%eax - - .align 16 - nop - nop -__itt_pt_mark_flush_2: - lea __itt_pt_mark_flush_3,%eax - jmp *%eax - - .align 16 - nop - nop - nop -__itt_pt_mark_flush_3: - ret - - .align 16 - -// int __itt_pt_mark_threshold(unsigned char index, unsigned long long* tmp, int threshold); - -__itt_pt_mark_threshold: - // 4(%esp) == index - // 8(%esp) == tmp - // 12(%esp) == threshold - xor %edx,%edx - xor %eax,%eax - - testl $1,4(%esp) - jnz mark_end -mark_begin: - mov $((1 << 30) + 1),%ecx - rdpmc - mov 8(%esp), %ecx - mov %eax, (%ecx) - mov %edx,4(%ecx) - jmp __itt_pt_mark -mark_end: - mov $((1 << 30) + 1),%ecx - rdpmc - mov 8(%esp), %ecx - sub (%ecx), %eax - sbb 4(%ecx), %edx - - sub 12(%esp), %eax // threshold - jnc found - sbb $0, %edx - jnc found - jmp __itt_pt_mark -found: - call __itt_pt_mark - jmp __itt_pt_flush - -// PTWRITE - - .align 16 - -// void __itt_pt_write(unsigned long long value); - - .long 0, 1, 2, 3 // GUID - -__itt_pt_write: - -// ptwrite dword ptr [esp + 4] - .byte 0xF3, 0x0F, 0xAE, 0x64, 0x24, 0x04 - ret - -// Ensure the stack is non-executable -#if defined(__ELF__) -.section .note.GNU-stack,"",@progbits -#endif diff --git a/src/ittnotify/ittptmark32.asm b/src/ittnotify/ittptmark32.asm deleted file mode 100644 index 1dd9ad17..00000000 --- a/src/ittnotify/ittptmark32.asm +++ /dev/null @@ -1,201 +0,0 @@ -COMMENT @ - Copyright (C) 2017-2025 Intel Corporation - - SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause -@ - -;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; ;;; Intel Processor Trace Marker Functionality -;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -.686p -.xmm -.model FLAT - -_TEXT segment - - public ___itt_pt_mark - public ___itt_pt_event - public ___itt_pt_mark_event - public ___itt_pt_mark_threshold - public ___itt_pt_write - public ___itt_pt_byte - - align 10h - -;;; void __itt_pt_mark(unsigned char index); - -___itt_pt_mark proc near - - movzx eax,byte ptr [esp + 4] - lea eax,__itt_pt_mark_call_table[eax * 4] - jmp eax - - align 04h - - dd 0, 1, 2, 3 ;;; GUID - - dd 0fadefadeh ;;; magic marker - -__itt_pt_mark_call_table: - - dd 256 dup(0000c2c3h OR (( $ - offset __itt_pt_mark_call_table) SHL 14)) - -___itt_pt_mark endp - - -___itt_pt_byte proc near - - mov ecx,[esp + 4] - -___itt_pt_byte_:: - - and ecx,0ffh - lea ecx,__itt_pt_byte_call_table[ecx] - jmp ecx - - align 04h - - dd 0, 1, 2, 3 ;;; GUID - - dd 0fadedeafh ;;; magic marker - -__itt_pt_byte_call_table: - - db 256 dup(0c3h) - -___itt_pt_byte endp - - align 10h - -___itt_pt_event proc near - - push ecx - mov ecx,[esp + 8] - rdpmc - - mov cl,al - call ___itt_pt_byte_ - mov cl,ah - call ___itt_pt_byte_ - shr eax,16 - mov cl,al - call ___itt_pt_byte_ - mov cl,ah - call ___itt_pt_byte_ - - mov cl,dl - call ___itt_pt_byte_ - mov cl,dh - call ___itt_pt_byte_ - shr edx,16 - mov cl,dl - call ___itt_pt_byte_ - mov cl,dh - call ___itt_pt_byte_ - - pop ecx - ret - -___itt_pt_event endp - - align 10h - -___itt_pt_mark_event proc near - - test byte ptr [esp + 4],1 - jnz odd - push 0 - call ___itt_pt_event - add esp,4 - jmp ___itt_pt_mark - -odd: - push dword ptr [esp + 4] - call ___itt_pt_mark - add esp,4 - mov dword ptr [esp + 4],0 - jmp ___itt_pt_event - -___itt_pt_mark_event endp - - align 10h - -___itt_pt_flush proc near - - lea eax,offset __itt_pt_mark_flush_1 - jmp eax - - align 10h - nop -__itt_pt_mark_flush_1: - lea eax,offset __itt_pt_mark_flush_2 - jmp eax - - align 10h - nop - nop -__itt_pt_mark_flush_2: - lea eax,offset __itt_pt_mark_flush_3 - jmp eax - - align 10h - nop - nop - nop -__itt_pt_mark_flush_3: - ret - -___itt_pt_flush endp - - align 10h - -;;; int __itt_pt_mark_threshold(unsigned char index, unsigned long long* tmp, int threshold); - -___itt_pt_mark_threshold proc near - test byte ptr [esp + 4],1 ;;; index - jnz mark_end -mark_begin: - mov ecx,(1 SHL 30) + 1 - rdpmc - mov ecx,[esp + 8] ;;; tmp - mov [ecx + 0],eax - mov [ecx + 4],edx - jmp ___itt_pt_mark -mark_end: - mov ecx,(1 SHL 30) + 1 - rdpmc - mov ecx,[esp + 8] ;;; tmp - sub eax,[ecx + 0] - sbb edx,[ecx + 4] - or edx,edx - jnz found - cmp edx,[esp + 12] ;;; threshold - jnc found - jmp ___itt_pt_mark -found: - call ___itt_pt_mark - jmp ___itt_pt_flush - -___itt_pt_mark_threshold endp - -;;; PTWRITE - - align 10h - -;;; void __itt_pt_write(unsigned long long value); - - dd 0, 1, 2, 3 ;;; GUID - -___itt_pt_write proc - -;;; ptwrite dword ptr [esp + 4] - db 0F3h, 0Fh, 0AEh, 64h, 24h, 04h - ret - -___itt_pt_write endp - -;;; - -_TEXT ends - end From f8823e4ca1f5a3e7e9ae88c67bfd8b1944d93a5d Mon Sep 17 00:00:00 2001 From: "Parshutin, Eugeny" Date: Tue, 2 Jun 2026 10:47:18 -0500 Subject: [PATCH 02/12] update github actions --- .github/workflows/main.yml | 27 ++++++++++++--------------- .github/workflows/release.yml | 5 +---- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 85ef689b..c5b6e3a6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,11 +33,8 @@ jobs: with: compiler: intel - name: Build C library - # 1. Force to only build the 64-bit version since ITT API 32-bit support will be discontinued soon - # 2. Disable PT support for MacOS since we have x86 specific assembly instructions - # 3. Switch to use Ninja CMake Generator for Windows since setup-fortran action - # doesn't work in case of CMake + VS (https://github.com/fortran-lang/setup-fortran/issues/45) - run: python buildall.py --force_bits 64 -ft ${{ matrix.optional_args }} + # Disable PT support for MacOS since we have x86 specific assembly instructions + run: python buildall.py -ft ${{ matrix.optional_args }} refcol_smoke: name: Reference collector smoke test @@ -47,13 +44,13 @@ jobs: matrix: include: - os: ubuntu-latest - lib: build_linux/64/bin/libittnotify_refcol.so - exe: build_linux/64/bin/refcol_smoke_test - build_dir: build_linux/64 + lib: build_linux/bin/libittnotify_refcol.so + exe: build_linux/bin/refcol_smoke_test + build_dir: build_linux - os: windows-latest - lib: build_win/64/bin/libittnotify_refcol.dll - exe: build_win/64/bin/refcol_smoke_test.exe - build_dir: build_win/64 + lib: build_win/bin/libittnotify_refcol.dll + exe: build_win/bin/refcol_smoke_test.exe + build_dir: build_win defaults: run: shell: bash @@ -61,7 +58,7 @@ jobs: - name: Checkout sources uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Build reference collector library - run: python buildall.py --force_bits 64 --refcol ${{ runner.os == 'Windows' && '--cmake_gen ninja' || '' }} + run: python buildall.py --refcol ${{ runner.os == 'Windows' && '--cmake_gen ninja' || '' }} - name: Build smoke test run: | cmake ${{ matrix.build_dir }} -DITT_API_REFCOL_SMOKE_TESTS=ON @@ -82,12 +79,12 @@ jobs: - name: Checkout sources uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Build C++ wrapper - run: python buildall.py --force_bits 64 -cpp + run: python buildall.py -cpp - name: Test (Linux) - run: ctest --test-dir build_linux/64/cpp --build-config Release --output-on-failure + run: ctest --test-dir build_linux/cpp --build-config Release --output-on-failure if: runner.os == 'Linux' - name: Test (Windows) - run: ctest --test-dir build_win/64/cpp --build-config Release --output-on-failure + run: ctest --test-dir build_win/cpp --build-config Release --output-on-failure if: runner.os == 'Windows' rust_format: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6d569d1..30e5d30c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,9 +24,6 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Config environment - if: runner.os == 'Linux' - run: sudo apt-get update && sudo apt-get install gcc-multilib - name: Setup Fortran compiler uses: fortran-lang/setup-fortran@8821f57b53846d35d62632eb51c60ac6c4bff4ce # v1.6.1 with: @@ -43,7 +40,7 @@ jobs: build*/**/bin build*/**/fortran - # build wheels for cpython versions 3.8+ on linux and windows 64-bits + # build wheels for cpython versions 3.8+ on linux and windows python_build: name: Build ittapi wheels runs-on: ${{ matrix.os }} From 87214038a7ac690c858adfe2491d4ac54740af56 Mon Sep 17 00:00:00 2001 From: "Parshutin, Eugeny" Date: Tue, 2 Jun 2026 10:48:00 -0500 Subject: [PATCH 03/12] update documentation --- README.md | 3 +-- docs/src/build.rst | 3 +-- docs/src/compile-and-link-with-itt-api.rst | 2 +- docs/src/using-jit-api.rst | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1ae094db..8a14d0cc 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ To build the library: - To list available build options execute: `python buildall.py -h` ``` -usage: buildall.py [-h] [-d] [-c] [-v] [-pt] [-ft] [-cpp] [--force_bits] +usage: buildall.py [-h] [-d] [-c] [-v] [-pt] [-ft] [-cpp] optional arguments: -h, --help show this help message and exit @@ -51,7 +51,6 @@ optional arguments: -pt, --ptmark enable anomaly detection support -ft, --fortran enable fortran support -cpp, --cpp enable C++ wrapper support - --force_bits specify bit version for the target --refcol enable reference collector build --vs specify visual studio version (Windows only) --cmake_gen specify cmake build generator (Windows only) diff --git a/docs/src/build.rst b/docs/src/build.rst index 60de39d8..80c750f7 100644 --- a/docs/src/build.rst +++ b/docs/src/build.rst @@ -47,7 +47,7 @@ Use these options to configure the build process: .. code-block:: console - usage: python buildall.py [-h] [-d] [-c] [-v] [-pt] [-ft] [--force_bits] + usage: python buildall.py [-h] [-d] [-c] [-v] [-pt] [-ft] optional arguments: -h, --help show this help message and exit @@ -57,7 +57,6 @@ Use these options to configure the build process: -pt, --ptmark enable anomaly detection support -ft, --fortran enable fortran support -cpp, --cpp enable C++ wrapper support - --force_bits specify bit version for the target --refcol enable reference collector build --vs specify visual studio version (Windows only) --cmake_gen specify cmake build generator (Windows only) diff --git a/docs/src/compile-and-link-with-itt-api.rst b/docs/src/compile-and-link-with-itt-api.rst index 0dd188bd..6b24dc60 100644 --- a/docs/src/compile-and-link-with-itt-api.rst +++ b/docs/src/compile-and-link-with-itt-api.rst @@ -13,7 +13,7 @@ system to establish access to the headers and libraries of the API: - Add ``\include`` to your ``INCLUDE`` path -- Add ``\build_\\bin`` +- Add ``\build_\bin`` to your ``LIBRARIES`` path diff --git a/docs/src/using-jit-api.rst b/docs/src/using-jit-api.rst index 8302d21c..180ccbb7 100644 --- a/docs/src/using-jit-api.rst +++ b/docs/src/using-jit-api.rst @@ -21,7 +21,7 @@ To include JIT Profiling support, do one of the following: in your code. This header file provides all API function prototype and type definitions. #. Link to ``jitprofiling.lib`` (Windows*) or ``jitprofiling.a`` (Linux*), - located under ``\build_\\bin`` + located under ``\build_\bin`` directory. From 6ad832525ecb0793d54dcc4b7abfbb677891351c Mon Sep 17 00:00:00 2001 From: "Parshutin, Eugeny" Date: Tue, 2 Jun 2026 10:57:39 -0500 Subject: [PATCH 04/12] improve buildall.py bump fortran gh action version add setup MSVC environment --- .github/workflows/codeql.yml | 4 +- .github/workflows/main.yml | 27 +++++++++--- .github/workflows/release.yml | 7 +++- CMakeLists.txt | 4 +- buildall.py | 78 ++++++++++++++++++++--------------- docs/src/build.rst | 2 +- 6 files changed, 77 insertions(+), 45 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 66fb928f..cf12ec86 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,9 +2,9 @@ name: "CodeQL" on: push: - branches: ["master"] + branches: ["master", "32bits"] pull_request: - branches: ["master"] + branches: ["master", "32bits"] schedule: # Run every Monday at midnight - cron: "0 0 * * 1" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c5b6e3a6..0812ef62 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ master ] + branches: [ master, 32bits ] pull_request: - branches: [ master ] + branches: [ master, 32bits ] env: CARGO_TERM_COLOR: always @@ -29,12 +29,17 @@ jobs: - name: Checkout sources uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Setup Fortran compiler - uses: fortran-lang/setup-fortran@8821f57b53846d35d62632eb51c60ac6c4bff4ce # v1.6.1 + uses: fortran-lang/setup-fortran@2a1b9c55897d827a9dfeb114408f3615e53b2b72 # v1.9.0 with: compiler: intel + - name: Setup MSVC environment + if: runner.os == 'Windows' + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + with: + arch: amd64 - name: Build C library # Disable PT support for MacOS since we have x86 specific assembly instructions - run: python buildall.py -ft ${{ matrix.optional_args }} + run: python buildall.py -v -ft ${{ matrix.optional_args }} refcol_smoke: name: Reference collector smoke test @@ -57,8 +62,13 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Setup MSVC environment + if: runner.os == 'Windows' + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + with: + arch: amd64 - name: Build reference collector library - run: python buildall.py --refcol ${{ runner.os == 'Windows' && '--cmake_gen ninja' || '' }} + run: python buildall.py -v --refcol ${{ runner.os == 'Windows' && '--cmake_gen ninja' || '' }} - name: Build smoke test run: | cmake ${{ matrix.build_dir }} -DITT_API_REFCOL_SMOKE_TESTS=ON @@ -78,8 +88,13 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Setup MSVC environment + if: runner.os == 'Windows' + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + with: + arch: amd64 - name: Build C++ wrapper - run: python buildall.py -cpp + run: python buildall.py -v -cpp ${{ runner.os == 'Windows' && '--cmake_gen ninja' || '' }} - name: Test (Linux) run: ctest --test-dir build_linux/cpp --build-config Release --output-on-failure if: runner.os == 'Linux' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30e5d30c..3c4bcdff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,9 +25,14 @@ jobs: - name: Checkout sources uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Setup Fortran compiler - uses: fortran-lang/setup-fortran@8821f57b53846d35d62632eb51c60ac6c4bff4ce # v1.6.1 + uses: fortran-lang/setup-fortran@2a1b9c55897d827a9dfeb114408f3615e53b2b72 # v1.9.0 with: compiler: intel + - name: Setup MSVC environment + if: runner.os == 'Windows' + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + with: + arch: amd64 - name: Build C library run: python buildall.py -ft ${{ matrix.optional_args }} - name: Display structure of files diff --git a/CMakeLists.txt b/CMakeLists.txt index 86b8fa0b..45ca97b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,10 @@ # -# Copyright (C) 2005-2023 Intel Corporation +# Copyright (C) 2005-2026 Intel Corporation # # SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause # -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) if(POLICY CMP0048) # The `project()` command manages `VERSION` variables diff --git a/buildall.py b/buildall.py index 03452986..783dc7ff 100755 --- a/buildall.py +++ b/buildall.py @@ -1,23 +1,22 @@ #!/usr/bin/env python # -# Copyright (C) 2005-2019 Intel Corporation +# Copyright (C) 2005-2026 Intel Corporation # # SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause # -from __future__ import print_function import os import sys import shutil -import fnmatch import subprocess def run_shell(cmd): - print("\n>>", cmd) - code = os.system(cmd) - if code != 0: - sys.exit(">> failed to run shell command: %s" % cmd) + print(f"\n>> {cmd}") + try: + subprocess.run(cmd, shell=True, check=True) + except subprocess.CalledProcessError: + sys.exit(f">> failed to run shell command: {cmd}") if sys.platform == 'win32': @@ -91,15 +90,14 @@ def get_vs_versions(): # https://www.mztools.com/articles/2008/MZ2008003.aspx def detect_cmake(): if sys.platform == 'darwin': - path, err = subprocess.Popen( - "which cmake", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() - if not path.strip(): - path, err = subprocess.Popen( - "which xcrun", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() - if not path.strip(): - print("No cmake and no XCode found...") - return None + cmake_path = shutil.which('cmake') + if cmake_path: + return 'cmake' + xcrun_path = shutil.which('xcrun') + if xcrun_path: return 'xcrun cmake' + print("No cmake and no XCode found...") + return None return 'cmake' @@ -121,9 +119,10 @@ def main(): "-cpp", "--cpp", help="enable C++ wrapper support", action="store_true") parser.add_argument( "--refcol", help="enable reference collector build", action="store_true") - if sys.platform == 'win32' and vs_versions: - parser.add_argument( - "--vs", help="specify visual studio version {default}", choices=vs_versions, default=vs_versions[0]) + if sys.platform == 'win32': + if vs_versions: + parser.add_argument( + "--vs", help="specify visual studio version {default}", choices=vs_versions, default=vs_versions[0]) parser.add_argument( "--cmake_gen", choices=["vs", "ninja"], help="specify cmake build generator") args = parser.parse_args() @@ -134,6 +133,7 @@ def main(): if os.path.exists(bin_dir): shutil.rmtree(bin_dir) + # Build folder: build_linux, build_win, build_darwin work_folder = os.path.join( work_dir, "build_" + sys.platform.replace('32', "")) already_there = os.path.exists(work_folder) @@ -151,9 +151,14 @@ def main(): return if sys.platform == 'win32': - use_ninja = args.cmake_gen == 'ninja' + vs_year = { + '12': '2013', '14': '2015', '15': '2017', + '16': '2019', '17': '2022', '18': '2025', + } + use_ninja = getattr(args, 'cmake_gen', None) == 'ninja' if vs_versions and not use_ninja: - generator = 'Visual Studio {}'.format(args.vs) + year = vs_year.get(args.vs, '') + generator = f'Visual Studio {args.vs} {year}'.strip() generator_args = '-A x64' else: generator = 'Ninja' @@ -162,22 +167,29 @@ def main(): generator = 'Unix Makefiles' generator_args = '' - run_shell('%s "%s" -G"%s" %s %s' % (cmake, work_dir, generator, generator_args, " ".join([ - ("-DCMAKE_BUILD_TYPE=Debug" if args.debug else ""), - ('-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' if args.verbose else ''), - ("-DITT_API_IPT_SUPPORT=1" if args.ptmark else ""), - ("-DITT_API_FORTRAN_SUPPORT=1" if args.fortran else ""), - ("-DITT_API_CPP_SUPPORT=ON" if args.cpp else ""), - ("-DITT_API_REFERENCE_COLLECTOR=ON" if args.refcol else ""), - ]))) + cmake_options = [f'-G"{generator}"', generator_args] + if args.debug: + cmake_options.append('-DCMAKE_BUILD_TYPE=Debug') + if args.verbose: + cmake_options.append('-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON') + if args.ptmark: + cmake_options.append('-DITT_API_IPT_SUPPORT=1') + if args.fortran: + cmake_options.append('-DITT_API_FORTRAN_SUPPORT=1') + if args.cpp: + cmake_options.append('-DITT_API_CPP_SUPPORT=ON') + if args.refcol: + cmake_options.append('-DITT_API_REFERENCE_COLLECTOR=ON') + + run_shell(f'{cmake} "{work_dir}" {" ".join(opt for opt in cmake_options if opt)}') if sys.platform == 'win32': - target_project = 'ALL_BUILD' if not use_ninja else 'all' - run_shell('%s --build . --config %s --target %s' % - (cmake, ('Debug' if args.debug else 'Release'), target_project)) + target = 'ALL_BUILD' if not use_ninja else 'all' + config = 'Debug' if args.debug else 'Release' + run_shell(f'{cmake} --build . --config {config} --target {target}') else: - run_shell('%s --build . --config %s' % - (cmake, ('Debug' if args.debug else 'Release'))) + config = 'Debug' if args.debug else 'Release' + run_shell(f'{cmake} --build . --config {config}') if __name__ == "__main__": diff --git a/docs/src/build.rst b/docs/src/build.rst index 80c750f7..77326a5b 100644 --- a/docs/src/build.rst +++ b/docs/src/build.rst @@ -47,7 +47,7 @@ Use these options to configure the build process: .. code-block:: console - usage: python buildall.py [-h] [-d] [-c] [-v] [-pt] [-ft] + usage: python buildall.py [-h] [-d] [-c] [-v] [-pt] [-ft] [-cpp] optional arguments: -h, --help show this help message and exit From 40a892b1f85507a3e82bf53b2ebccebe34a1e38b Mon Sep 17 00:00:00 2001 From: "Parshutin, Eugeny" Date: Wed, 3 Jun 2026 08:31:10 -0500 Subject: [PATCH 05/12] romove dead 32bit code --- include/AdvisorAnnotate.cs | 9 +-------- include/advisor-annotate.h | 12 ++---------- include/fortran/advisor_annotate.f90 | 4 ---- include/ittnotify.h | 12 ++---------- include/jitprofiling.h | 6 +----- include/legacy/ittnotify.h | 12 ++---------- src/ittnotify/ittnotify_config.h | 22 ++++------------------ src/ittnotify/ittnotify_static.c | 14 ++------------ src/ittnotify/jitprofiling.c | 4 ---- src/ittnotify_refcol/README.md | 3 +-- 10 files changed, 15 insertions(+), 83 deletions(-) diff --git a/include/AdvisorAnnotate.cs b/include/AdvisorAnnotate.cs index 0aa23887..8f104ed5 100644 --- a/include/AdvisorAnnotate.cs +++ b/include/AdvisorAnnotate.cs @@ -84,14 +84,7 @@ static Annotate() { string libname; - if (Environment.Is64BitOperatingSystem) - { - libname = Environment.GetEnvironmentVariable("INTEL_LIBITTNOTIFY64"); - } - else - { - libname = Environment.GetEnvironmentVariable("INTEL_LIBITTNOTIFY32"); - } + libname = Environment.GetEnvironmentVariable("INTEL_LIBITTNOTIFY64"); if (String.IsNullOrEmpty(libname)) { diff --git a/include/advisor-annotate.h b/include/advisor-annotate.h index 94aced91..bedc08de 100644 --- a/include/advisor-annotate.h +++ b/include/advisor-annotate.h @@ -122,11 +122,7 @@ typedef HMODULE lib_t; #else /* defined(WIN32) || defined(_WIN32) */ -#if defined _M_IX86 || __i386__ -# define ANNOTATEAPI __attribute__ ((cdecl)) -#else -# define ANNOTATEAPI /* actual only on x86 platform */ -#endif +#define ANNOTATEAPI /* nothing */ #ifndef ANNOTATE_DECLARE @@ -305,11 +301,7 @@ __annotate_routines_init(struct __annotate_routines* itt) { char* lib_name = NULL; lib_t itt_notify = 0; - if (sizeof(void*) > 4) { - lib_name = getenv("INTEL_LIBITTNOTIFY64"); - } else { - lib_name = getenv("INTEL_LIBITTNOTIFY32"); - } + lib_name = getenv("INTEL_LIBITTNOTIFY64"); if (lib_name) { itt_notify = __itt_load_lib(lib_name); diff --git a/include/fortran/advisor_annotate.f90 b/include/fortran/advisor_annotate.f90 index 7913d0b1..a511f17a 100644 --- a/include/fortran/advisor_annotate.f90 +++ b/include/fortran/advisor_annotate.f90 @@ -637,11 +637,7 @@ subroutine load_itt_library type(C_PTR) :: library character*1024 ittnotify_path -!dec$ if defined(__X86_64) .or. defined(_M_X64) call getenv('INTEL_LIBITTNOTIFY64',ittnotify_path) -!dec$ else - call getenv('INTEL_LIBITTNOTIFY32',ittnotify_path) -!dec$ endif if ( ittnotify_path /= '' ) then ! print *,' libpath: "'//trim(ittnotify_path)//'"' !dec$ if defined(WIN32) .or. defined(_WIN32) diff --git a/include/ittnotify.h b/include/ittnotify.h index b4d75be1..519075c6 100644 --- a/include/ittnotify.h +++ b/include/ittnotify.h @@ -160,11 +160,7 @@ The same ID may not be reused for different instances, unless a previous # 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__ */ +# define ITTAPI_CDECL /* nothing */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* ITTAPI_CDECL */ @@ -172,11 +168,7 @@ The same ID may not be reused for different instances, unless a previous # 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__ */ +# define STDCALL /* nothing */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* STDCALL */ diff --git a/include/jitprofiling.h b/include/jitprofiling.h index 5a883594..7cbbbc31 100644 --- a/include/jitprofiling.h +++ b/include/jitprofiling.h @@ -586,11 +586,7 @@ extern "C" { # 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__ */ +# define JITAPI_CDECL /* nothing */ # endif /* defined WIN32 || defined _WIN32 */ #endif /* JITAPI_CDECL */ diff --git a/include/legacy/ittnotify.h b/include/legacy/ittnotify.h index cb014f3e..84ed0095 100644 --- a/include/legacy/ittnotify.h +++ b/include/legacy/ittnotify.h @@ -98,11 +98,7 @@ # 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__ */ +# define ITTAPI_CDECL /* nothing */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* ITTAPI_CDECL */ @@ -110,11 +106,7 @@ # 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__ */ +# define STDCALL /* nothing */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* STDCALL */ diff --git a/src/ittnotify/ittnotify_config.h b/src/ittnotify/ittnotify_config.h index b4b29dc8..24030b23 100644 --- a/src/ittnotify/ittnotify_config.h +++ b/src/ittnotify/ittnotify_config.h @@ -93,11 +93,7 @@ # 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__ */ +# define ITTAPI_CDECL /* nothing */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* ITTAPI_CDECL */ @@ -105,11 +101,7 @@ # 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__ */ +# define STDCALL /* nothing */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* STDCALL */ @@ -145,10 +137,6 @@ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @endcond */ -#ifndef ITT_ARCH_IA32 -# define ITT_ARCH_IA32 1 -#endif /* ITT_ARCH_IA32 */ - #ifndef ITT_ARCH_IA32E # define ITT_ARCH_IA32E 2 #endif /* ITT_ARCH_IA32E */ @@ -170,9 +158,7 @@ #endif /* ITT_ARCH_ARM64 */ #ifndef ITT_ARCH -# if defined _M_IX86 || defined __i386__ -# define ITT_ARCH ITT_ARCH_IA32 -# elif defined _M_X64 || defined _M_AMD64 || defined __x86_64__ +# if defined _M_X64 || defined _M_AMD64 || defined __x86_64__ # define ITT_ARCH ITT_ARCH_IA32E # elif defined _M_IA64 || defined __ia64__ # define ITT_ARCH ITT_ARCH_IA64 @@ -342,7 +328,7 @@ __itt_interlocked_compare_exchange(volatile long* ptr, long exchange, long compe #else /* __INTEL_COMPILER */ /* TODO: Add Support for not Intel compilers for IA-64 architecture */ #endif /* __INTEL_COMPILER */ -#elif ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_IA32E /* ITT_ARCH!=ITT_ARCH_IA64 */ +#elif ITT_ARCH==ITT_ARCH_IA32E /* ITT_ARCH!=ITT_ARCH_IA64 */ ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend) ITT_INLINE_ATTRIBUTE; ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend) diff --git a/src/ittnotify/ittnotify_static.c b/src/ittnotify/ittnotify_static.c index 85f66ec0..4c9d8df6 100644 --- a/src/ittnotify/ittnotify_static.c +++ b/src/ittnotify/ittnotify_static.c @@ -102,24 +102,14 @@ static const char* ittnotify_lib_name = "libittnotify.dylib"; #endif /* default location of userapi collector on Android */ -#define ANDROID_ITTNOTIFY_DEFAULT_PATH_MASK(x) "/data/data/com.intel.vtune/perfrun/lib" \ - #x "/runtime/libittnotify.so" - -#if ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_ARM -#define ANDROID_ITTNOTIFY_DEFAULT_PATH ANDROID_ITTNOTIFY_DEFAULT_PATH_MASK(32) -#else -#define ANDROID_ITTNOTIFY_DEFAULT_PATH ANDROID_ITTNOTIFY_DEFAULT_PATH_MASK(64) -#endif +#define ANDROID_ITTNOTIFY_DEFAULT_PATH "/data/data/com.intel.vtune/perfrun/lib" \ + "64/runtime/libittnotify.so" #endif #ifndef LIB_VAR_NAME -#if ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_ARM -#define LIB_VAR_NAME INTEL_LIBITTNOTIFY32 -#else #define LIB_VAR_NAME INTEL_LIBITTNOTIFY64 -#endif #endif /* LIB_VAR_NAME */ #define ITT_MUTEX_INIT_AND_LOCK(p) { \ diff --git a/src/ittnotify/jitprofiling.c b/src/ittnotify/jitprofiling.c index 31a15ee2..a186035f 100644 --- a/src/ittnotify/jitprofiling.c +++ b/src/ittnotify/jitprofiling.c @@ -21,11 +21,7 @@ static const char rcsid[] = "\n@(#) $Revision$\n"; #ifndef NEW_DLL_ENVIRONMENT_VAR -#if ITT_ARCH==ITT_ARCH_IA32 -#define NEW_DLL_ENVIRONMENT_VAR "INTEL_JIT_PROFILER32" -#else #define NEW_DLL_ENVIRONMENT_VAR "INTEL_JIT_PROFILER64" -#endif #endif /* NEW_DLL_ENVIRONMENT_VAR */ #if ITT_PLATFORM==ITT_PLATFORM_WIN diff --git a/src/ittnotify_refcol/README.md b/src/ittnotify_refcol/README.md index 2036a562..b99991c3 100644 --- a/src/ittnotify_refcol/README.md +++ b/src/ittnotify_refcol/README.md @@ -4,8 +4,7 @@ This is a reference implementation of the ITT API *dynamic* part that performs tracing data from ITT API function calls to log files. To use this solution, build the collector as a shared library and point the -full library path to the `INTEL_LIBITTNOTIFY64` or `INTEL_LIBITTNOTIFY32` -environment variable. +full library path to the `INTEL_LIBITTNOTIFY64` environment variable. ## Building From 5e605cdf4e32d53b68757864465748fe27da9d23 Mon Sep 17 00:00:00 2001 From: "Parshutin, Eugeny" Date: Wed, 3 Jun 2026 08:31:33 -0500 Subject: [PATCH 06/12] polish docs --- docs/src/compile-and-link-with-itt-api.rst | 5 +---- docs/src/jit-api-support.rst | 18 ++++++------------ docs/src/ref_collector.rst | 3 +-- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/docs/src/compile-and-link-with-itt-api.rst b/docs/src/compile-and-link-with-itt-api.rst index 6b24dc60..1cea67e1 100644 --- a/docs/src/compile-and-link-with-itt-api.rst +++ b/docs/src/compile-and-link-with-itt-api.rst @@ -106,8 +106,7 @@ Step 5: Load the Dynamic Library After you instrument your application and link the static library, you must load the dynamic library of the ITT API to your application. To do this, -depending on your system architecture, set the ``INTEL_LIBITTNOTIFY32`` or -the ``INTEL_LIBITTNOTIFY64`` environment variable. +set the ``INTEL_LIBITTNOTIFY64`` environment variable. **Windows OS:** @@ -116,7 +115,6 @@ the ``INTEL_LIBITTNOTIFY64`` environment variable. .. code-block:: bash - set INTEL_LIBITTNOTIFY32=\bin32\runtime\ittnotify_collector.dll set INTEL_LIBITTNOTIFY64=\bin64\runtime\ittnotify_collector.dll @@ -126,7 +124,6 @@ the ``INTEL_LIBITTNOTIFY64`` environment variable. .. code-block:: bash - export INTEL_LIBITTNOTIFY32=/lib32/runtime/libittnotify_collector.so export INTEL_LIBITTNOTIFY64=/lib64/runtime/libittnotify_collector.so diff --git a/docs/src/jit-api-support.rst b/docs/src/jit-api-support.rst index e0a25873..dafc9d36 100644 --- a/docs/src/jit-api-support.rst +++ b/docs/src/jit-api-support.rst @@ -44,35 +44,29 @@ Environment Variables in the JIT Profiling API ---------------------------------------------- -The JIT Profiling API contains two environment variables: +The JIT Profiling API uses the ``INTEL_JIT_PROFILER64`` environment variable +that contains the path to a specific runtime library. -- ``INTEL_JIT_PROFILER32`` -- ``INTEL_JIT_PROFILER64`` - -In turn, these variables contain paths to specific runtime libraries. - -These variables are used to signal the replacement of the stub +This variable is used to signal the replacement of the stub implementation of the JIT API with the JIT API collector. After you instrument your code with the JIT API and link it to the JIT API stub (``libjitprofiling.lib/libjitprofiling.a``), when the -environment variables are set, your code loads the libraries defined -in the variables. +environment variable is set, your code loads the library defined +in the variable. -Make sure to set these environment variables for the ``ittnotify_collector`` +Make sure to set this environment variable for the ``ittnotify_collector`` to enable data collection: On Windows*: .. code-block:: bash - INTEL_JIT_PROFILER32=\bin32\runtime\ittnotify_collector.dll INTEL_JIT_PROFILER64=\bin64\runtime\ittnotify_collector.dll On Linux*: .. code-block:: bash - INTEL_JIT_PROFILER32=/lib32/runtime/libittnotify_collector.so INTEL_JIT_PROFILER64=/lib64/runtime/libittnotify_collector.so On FreeBSD*: diff --git a/docs/src/ref_collector.rst b/docs/src/ref_collector.rst index 09dec382..36b0be23 100644 --- a/docs/src/ref_collector.rst +++ b/docs/src/ref_collector.rst @@ -8,8 +8,7 @@ This is a reference implementation of the ITT API **dynamic** part that performs tracing data from ITT API function calls to log files. To use this solution, build the collector as a shared library and point the -full library path to the `INTEL_LIBITTNOTIFY64` or `INTEL_LIBITTNOTIFY32` -environment variable. +full library path to the `INTEL_LIBITTNOTIFY64` environment variable. Building From d2a5718da40f0ab76ac717a0fff386502bb830c1 Mon Sep 17 00:00:00 2001 From: "Parshutin, Eugeny" Date: Wed, 3 Jun 2026 08:53:07 -0500 Subject: [PATCH 07/12] api version update --- src/ittnotify/ittnotify_config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ittnotify/ittnotify_config.h b/src/ittnotify/ittnotify_config.h index 24030b23..74911576 100644 --- a/src/ittnotify/ittnotify_config.h +++ b/src/ittnotify/ittnotify_config.h @@ -194,10 +194,10 @@ #define ITT_MAGIC { 0xED, 0xAB, 0xAB, 0xEC, 0x0D, 0xEE, 0xDA, 0x30 } /* Replace with snapshot date YYYYMMDD for promotion build. */ -#define API_VERSION_BUILD 20250807 +#define API_VERSION_BUILD 20260603 #ifndef API_VERSION_NUM -#define API_VERSION_NUM 3.26.3 +#define API_VERSION_NUM 3.28.0 #endif /* API_VERSION_NUM */ #define API_VERSION "ITT-API-Version " ITT_TO_STR(API_VERSION_NUM) \ @@ -328,7 +328,7 @@ __itt_interlocked_compare_exchange(volatile long* ptr, long exchange, long compe #else /* __INTEL_COMPILER */ /* TODO: Add Support for not Intel compilers for IA-64 architecture */ #endif /* __INTEL_COMPILER */ -#elif ITT_ARCH==ITT_ARCH_IA32E /* ITT_ARCH!=ITT_ARCH_IA64 */ +#elif ITT_ARCH==ITT_ARCH_IA32E ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend) ITT_INLINE_ATTRIBUTE; ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend) From 942b1e6a31de7399b2ed1d5d1b4bf2994e306ef1 Mon Sep 17 00:00:00 2001 From: "Parshutin, Eugeny" Date: Wed, 3 Jun 2026 10:11:35 -0500 Subject: [PATCH 08/12] cleanup --- .github/workflows/codeql.yml | 4 ++-- .github/workflows/main.yml | 8 +++++--- README.md | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index cf12ec86..66fb928f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,9 +2,9 @@ name: "CodeQL" on: push: - branches: ["master", "32bits"] + branches: ["master"] pull_request: - branches: ["master", "32bits"] + branches: ["master"] schedule: # Run every Monday at midnight - cron: "0 0 * * 1" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0812ef62..df719b85 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ master, 32bits ] + branches: [ master ] pull_request: - branches: [ master, 32bits ] + branches: [ master ] env: CARGO_TERM_COLOR: always @@ -38,7 +38,9 @@ jobs: with: arch: amd64 - name: Build C library - # Disable PT support for MacOS since we have x86 specific assembly instructions + # - Disable PT support for MacOS since we have x86 specific assembly instructions + # - Switch to use Ninja CMake Generator for Windows since setup-fortran action + # doesn't work in case of CMake + VS (https://github.com/fortran-lang/setup-fortran/issues/45) run: python buildall.py -v -ft ${{ matrix.optional_args }} refcol_smoke: diff --git a/README.md b/README.md index 8a14d0cc..e2c11bd5 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ To build the library: - Get general development tools, including C/C++ Compiler - Install [Python](https://python.org) 3.6 or later -- Install [CMake](https://cmake.org) 3.5 or later +- Install [CMake](https://cmake.org) 3.10 or later - For a Windows* system, install one of these: - [Microsoft Visual Studio](https://visualstudio.microsoft.com) 2015 or later - [Ninja](https://github.com/ninja-build/ninja/releases) 1.9 or later @@ -41,7 +41,7 @@ To build the library: - To list available build options execute: `python buildall.py -h` ``` -usage: buildall.py [-h] [-d] [-c] [-v] [-pt] [-ft] [-cpp] +usage: buildall.py [-h] [-d] [-c] [-v] [-pt] [-ft] [-cpp] [--refcol] optional arguments: -h, --help show this help message and exit From 48b94dd80020a2432d93a38230674c1aa9abaf60 Mon Sep 17 00:00:00 2001 From: "Parshutin, Eugeny" Date: Wed, 3 Jun 2026 10:18:29 -0500 Subject: [PATCH 09/12] remove verbose flag --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df719b85..971fb02a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: # - Disable PT support for MacOS since we have x86 specific assembly instructions # - Switch to use Ninja CMake Generator for Windows since setup-fortran action # doesn't work in case of CMake + VS (https://github.com/fortran-lang/setup-fortran/issues/45) - run: python buildall.py -v -ft ${{ matrix.optional_args }} + run: python buildall.py -ft ${{ matrix.optional_args }} refcol_smoke: name: Reference collector smoke test @@ -70,7 +70,7 @@ jobs: with: arch: amd64 - name: Build reference collector library - run: python buildall.py -v --refcol ${{ runner.os == 'Windows' && '--cmake_gen ninja' || '' }} + run: python buildall.py --refcol ${{ runner.os == 'Windows' && '--cmake_gen ninja' || '' }} - name: Build smoke test run: | cmake ${{ matrix.build_dir }} -DITT_API_REFCOL_SMOKE_TESTS=ON @@ -96,7 +96,7 @@ jobs: with: arch: amd64 - name: Build C++ wrapper - run: python buildall.py -v -cpp ${{ runner.os == 'Windows' && '--cmake_gen ninja' || '' }} + run: python buildall.py -cpp ${{ runner.os == 'Windows' && '--cmake_gen ninja' || '' }} - name: Test (Linux) run: ctest --test-dir build_linux/cpp --build-config Release --output-on-failure if: runner.os == 'Linux' From b19adc13959665c48a96fd41c6b1b3e498dff699 Mon Sep 17 00:00:00 2001 From: "Parshutin, Eugeny" Date: Wed, 3 Jun 2026 12:45:54 -0500 Subject: [PATCH 10/12] address review comments --- buildall.py | 11 ++++++----- docs/src/build.rst | 4 ++-- src/ittnotify/ittnotify_config.h | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/buildall.py b/buildall.py index 783dc7ff..7efb4c10 100755 --- a/buildall.py +++ b/buildall.py @@ -132,15 +132,16 @@ def main(): bin_dir = os.path.join(work_dir, 'bin') if os.path.exists(bin_dir): shutil.rmtree(bin_dir) + work_folder = os.path.join( + work_dir, "build_" + sys.platform.replace('32', "")) + if os.path.exists(work_folder): + shutil.rmtree(work_folder) + return # Build folder: build_linux, build_win, build_darwin work_folder = os.path.join( work_dir, "build_" + sys.platform.replace('32', "")) - already_there = os.path.exists(work_folder) - if already_there and args.clean: - shutil.rmtree(work_folder) - already_there = False - if not already_there: + if not os.path.exists(work_folder): os.makedirs(work_folder) print("work_folder: ", work_folder) os.chdir(work_folder) diff --git a/docs/src/build.rst b/docs/src/build.rst index 77326a5b..2cdd514e 100644 --- a/docs/src/build.rst +++ b/docs/src/build.rst @@ -10,7 +10,7 @@ Before you build the ITT/JIT APIs, make sure you have the following hardware and - Get general development tools, including C/C++ Compiler - Install `Python `__ 3.6 or later -- Install `CMake `__ 3.5 or later +- Install `CMake `__ 3.10 or later - For a Windows* system, install one of these: - `Microsoft Visual Studio `__ 2015 or later @@ -47,7 +47,7 @@ Use these options to configure the build process: .. code-block:: console - usage: python buildall.py [-h] [-d] [-c] [-v] [-pt] [-ft] [-cpp] + usage: python buildall.py [-h] [-d] [-c] [-v] [-pt] [-ft] [-cpp] [--refcol] optional arguments: -h, --help show this help message and exit diff --git a/src/ittnotify/ittnotify_config.h b/src/ittnotify/ittnotify_config.h index 74911576..14099f95 100644 --- a/src/ittnotify/ittnotify_config.h +++ b/src/ittnotify/ittnotify_config.h @@ -168,6 +168,8 @@ # define ITT_ARCH ITT_ARCH_ARM64 # elif defined __powerpc64__ # define ITT_ARCH ITT_ARCH_PPC64 +# else +# error "Unsupported architecture. Only 64-bit platforms are supported." # endif #endif From d5240ec26120527e816ea1fc478740d26ad5efa6 Mon Sep 17 00:00:00 2001 From: "Parshutin, Eugeny" Date: Wed, 3 Jun 2026 14:24:29 -0500 Subject: [PATCH 11/12] address new comments --- CMakeLists.txt | 1 - src/ittnotify/ittnotify_config.h | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 45ca97b5..0440fd97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,6 @@ if(ITT_API_IPT_SUPPORT) if(NOT WIN32) enable_language(ASM) set(ITT_PT src/ittnotify/ittptmark64.S) - set(CMAKE_ASM_FLAGS "${CFLAGS}") else() enable_language(ASM_MASM) set(ITT_PT src/ittnotify/ittptmark64.asm) diff --git a/src/ittnotify/ittnotify_config.h b/src/ittnotify/ittnotify_config.h index 14099f95..47570d22 100644 --- a/src/ittnotify/ittnotify_config.h +++ b/src/ittnotify/ittnotify_config.h @@ -162,9 +162,7 @@ # define ITT_ARCH ITT_ARCH_IA32E # elif defined _M_IA64 || defined __ia64__ # define ITT_ARCH ITT_ARCH_IA64 -# elif defined _M_ARM || defined __arm__ -# define ITT_ARCH ITT_ARCH_ARM -# elif defined __aarch64__ +# elif defined __aarch64__ || defined _M_ARM64 # define ITT_ARCH ITT_ARCH_ARM64 # elif defined __powerpc64__ # define ITT_ARCH ITT_ARCH_PPC64 From 02d3f3076315989e89792adfdb30aa5e7677ccf7 Mon Sep 17 00:00:00 2001 From: "Parshutin, Eugeny" Date: Fri, 5 Jun 2026 05:25:47 -0500 Subject: [PATCH 12/12] replace #error for unsupported architectures with ITT_ARCH_UNSUPPORTED fallback to avoid breaking downstream 32-bit builds --- src/ittnotify/ittnotify_config.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ittnotify/ittnotify_config.h b/src/ittnotify/ittnotify_config.h index 47570d22..c6901b18 100644 --- a/src/ittnotify/ittnotify_config.h +++ b/src/ittnotify/ittnotify_config.h @@ -157,6 +157,10 @@ # define ITT_ARCH_ARM64 6 #endif /* ITT_ARCH_ARM64 */ +#ifndef ITT_ARCH_UNSUPPORTED +# define ITT_ARCH_UNSUPPORTED 0 +#endif /* ITT_ARCH_UNSUPPORTED */ + #ifndef ITT_ARCH # if defined _M_X64 || defined _M_AMD64 || defined __x86_64__ # define ITT_ARCH ITT_ARCH_IA32E @@ -167,7 +171,7 @@ # elif defined __powerpc64__ # define ITT_ARCH ITT_ARCH_PPC64 # else -# error "Unsupported architecture. Only 64-bit platforms are supported." +# define ITT_ARCH ITT_ARCH_UNSUPPORTED # endif #endif