diff --git a/deps/v8/third_party/ittapi/CMakeLists.txt b/deps/v8/third_party/ittapi/CMakeLists.txt index 43cae064399146..0e3baac30511ef 100644 --- a/deps/v8/third_party/ittapi/CMakeLists.txt +++ b/deps/v8/third_party/ittapi/CMakeLists.txt @@ -1,67 +1,15 @@ -#/* -# 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-2019 Intel Corporation # -# Copyright (c) 2005-2017 Intel Corporation. All rights reserved. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause # -# 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. -# */ -#******************************************************************************************************************************************************************************************************************************************************************************************** - -cmake_minimum_required(VERSION 2.8) + +cmake_minimum_required(VERSION 2.8.12) project(ittapi) OPTION(FORCE_32 "Force a 32bit compile on 64bit" OFF) +OPTION(ITT_API_IPT_SUPPORT "ptmarks support") IF(FORCE_32 AND UNIX) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") @@ -99,26 +47,36 @@ set(ITT_PUBLIC_HDRS include/libittnotify.h ) -file(GLOB ITT_SRCS "src/ittnotify/*.c" "src/ittnotify/*.h") +if (ITT_API_IPT_SUPPORT) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DITT_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}" ) + else() + enable_language(ASM_MASM) + if (ARCH_64) + set(ITT_PT src/ittnotify/ittptmark64.asm) + else() + set(ITT_PT src/ittnotify/ittptmark32.asm) + endif() + endif() +endif() -add_library(ittnotify STATIC ${ITT_SRCS} ${ITT_PUBLIC_HDRS}) +file(GLOB ITT_SRCS "src/ittnotify/*.c" "src/ittnotify/*.h") -if(APPLE) - SET_TARGET_PROPERTIES(ittnotify PROPERTIES OUTPUT_NAME ittnotify) -endif() +add_library(ittnotify STATIC ${ITT_SRCS} ${ITT_PUBLIC_HDRS} ${ITT_PT}) if(WIN32) - if(ARCH_64) - SET_TARGET_PROPERTIES(ittnotify PROPERTIES OUTPUT_NAME libittnotify64) - else() - SET_TARGET_PROPERTIES(ittnotify PROPERTIES OUTPUT_NAME libittnotify32) - endif() + SET_TARGET_PROPERTIES(ittnotify PROPERTIES OUTPUT_NAME libittnotify) else() - if(ARCH_64) - SET_TARGET_PROPERTIES(ittnotify PROPERTIES OUTPUT_NAME ittnotify64) - else() - SET_TARGET_PROPERTIES(ittnotify PROPERTIES OUTPUT_NAME ittnotify32) - endif() + SET_TARGET_PROPERTIES(ittnotify PROPERTIES OUTPUT_NAME ittnotify) endif() if (NOT WIN32) diff --git a/deps/v8/third_party/ittapi/src/ittnotify/LICENSE.BSD b/deps/v8/third_party/ittapi/LICENSES/BSD-3-Clause.txt similarity index 69% rename from deps/v8/third_party/ittapi/src/ittnotify/LICENSE.BSD rename to deps/v8/third_party/ittapi/LICENSES/BSD-3-Clause.txt index 2b17c33a5e17d7..37478a55f35f5a 100644 --- a/deps/v8/third_party/ittapi/src/ittnotify/LICENSE.BSD +++ b/deps/v8/third_party/ittapi/LICENSES/BSD-3-Clause.txt @@ -1,7 +1,8 @@ -Copyright (c) 2017, Intel Corporation -All rights reserved. +Copyright (c) 2019 Intel Corporation. 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 the 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. + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. 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. +3. Neither the name of the copyright holder 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 HOLDER 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. diff --git a/deps/v8/third_party/ittapi/src/ittnotify/LICENSE.GPL b/deps/v8/third_party/ittapi/LICENSES/GPL-2.0-only.txt similarity index 96% rename from deps/v8/third_party/ittapi/src/ittnotify/LICENSE.GPL rename to deps/v8/third_party/ittapi/LICENSES/GPL-2.0-only.txt index efe910f4f0cf2d..be1e815450496e 100644 --- a/deps/v8/third_party/ittapi/src/ittnotify/LICENSE.GPL +++ b/deps/v8/third_party/ittapi/LICENSES/GPL-2.0-only.txt @@ -1,65 +1,103 @@ -The GNU General Public License (GPL) +GNU GENERAL PUBLIC LICENSE Version 2, June 1991 + Copyright (C) 1989, 1991 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + Preamble -The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. + When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + The precise terms and conditions for copying, distribution and modification follow. + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS + How to Apply These Terms to Your New Programs + If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. -One line to give the program's name and a brief idea of what it does. -Copyright (C) + + +Copyright (C) < yyyy> + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + Also add information on how to contact you by electronic and paper mail. + If the program is interactive, make it output a short notice like this when it starts in an interactive mode: + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. + You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: + Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. -signature of Ty Coon, 1 April 1989 -Ty Coon, President of Vice -This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. + +, 1 April 1989 Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff --git a/deps/v8/third_party/ittapi/README.md b/deps/v8/third_party/ittapi/README.md new file mode 100644 index 00000000000000..4844f55651706a --- /dev/null +++ b/deps/v8/third_party/ittapi/README.md @@ -0,0 +1,38 @@ +Intel® Instrumentation and Tracing Technology (ITT) and Just-In-Time (JIT) API +================================================================================== + +This ITT/JIT open source profiling API includes: + + - Instrumentation and Tracing Technology (ITT) API + - Just-In-Time (JIT) Profiling API + +The Instrumentation and Tracing Technology (ITT) API enables your application +to generate and control the collection of trace data during its execution +across different Intel tools. + +ITT API consists of two parts: a _static part_ and a _dynamic part_. The +_dynamic part_ is specific for a tool and distributed only with a particular +tool. The _static part_ is a common part shared between tools. Currently, the +static part of ITT API is distributed as a static library and released under +a BSD/GPLv2 dual license with every tool supporting ITT API. + +### Build + +To build the library: + - On Windows, Linux and OSX: requires [cmake](https://cmake.org) to be set in `PATH` + - Windows: requires Visual Studio installed or requires [Ninja](https://github.com/ninja-build/ninja/releases) to be set in `PATH` + - To list available build options execute: `python buildall.py -h` +``` +usage: buildall.py [-h] [-d] [-c] [-v] [-pt] [--force_bits] + +optional arguments: + -h, --help show this help message and exit + -d, --debug specify debug build configuration (release by default) + -c, --clean delete any intermediate and output files + -v, --verbose enable verbose output from build process + -pt, --ptmark enable anomaly detection support + --force_bits specify bit version for the target +``` +### License + +All code in the repo is dual licensed under GPLv2 and 3-Clause BSD licenses diff --git a/deps/v8/third_party/ittapi/README.txt b/deps/v8/third_party/ittapi/README.txt deleted file mode 100644 index 0899e4cea1cc4a..00000000000000 --- a/deps/v8/third_party/ittapi/README.txt +++ /dev/null @@ -1,28 +0,0 @@ -Intel® The Instrumentation and Tracing Technology (ITT) and Just-In-Time (JIT) API -********************************************************************************** - -This ITT/JIT open source profiling API includes: - - Instrumentation and Tracing Technology(ITT) API - Just-In-Time(JIT) Profiling API - -The Instrumentation and Tracing Technology (ITT) API enables your application -to generate and control the collection of trace data during its execution -across different Intel tools. - -ITT API consists of two parts: static part and dynamic part. -Dynamic part is specific for a tool and distributed only with a particular tool. -Static part is a common part shared between tools. -Currently static part of ITT API is distributed as static library and opened -sources under BSD/GPLv2 dual license with every tool supporting ITT API. - - Build the library: - On Windows, Linux and OSX: requires cmake (https://cmake.org) to be set in PATH - python buildall.py - Windows: requires Visual Studio installed or requires Ninja (https://github.com/ninja-build/ninja/releases) to be set in PATH - - Load up the library: - On Windows and Linux: - Set environment variable INTEL_LIBITTNOTIFY32/INTEL_LIBITTNOTIFY64 to the full path to the libittnotify[32/64].[lib/a] - On OSX: - Set environment variable DYLD_INSERT_LIBRARIES to the full path to the libittnotify.dylib diff --git a/deps/v8/third_party/ittapi/buildall.py b/deps/v8/third_party/ittapi/buildall.py old mode 100644 new mode 100755 index ba5af477936c1c..f03eafbe7c89ee --- a/deps/v8/third_party/ittapi/buildall.py +++ b/deps/v8/third_party/ittapi/buildall.py @@ -1,61 +1,9 @@ -#/* -# This file is provided under a dual BSD/GPLv2 license. When using or -# redistributing this file, you may do so under either license. +#!/usr/bin/env python # -# GPL LICENSE SUMMARY +# Copyright (C) 2005-2019 Intel Corporation # -# Copyright (c) 2005-2017 Intel Corporation. All rights reserved. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause # -# 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. -# */ -#******************************************************************************************************************************************************************************************************************************************************************************************** from __future__ import print_function import os @@ -153,18 +101,28 @@ def main(): import argparse parser = argparse.ArgumentParser() vs_versions = get_vs_versions() - parser.add_argument("-d", "--debug", action="store_true") - parser.add_argument("-v", "--verbose", action="store_true") + parser.add_argument("-d", "--debug", help="specify debug build configuration (release by default)", action="store_true") + parser.add_argument("-c", "--clean", help="delete any intermediate and output files", action="store_true") + parser.add_argument("-v", "--verbose", help="enable verbose output from build process", action="store_true") + parser.add_argument("-pt", "--ptmark", help="enable anomaly detection support", 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", choices=vs_versions, default=vs_versions[0]) + parser.add_argument("--vs", help="specify visual studio version {default}", choices=vs_versions, default=vs_versions[0]) args = parser.parse_args() - target_bits = ['64'] - if (sys.platform != 'darwin'): # on MAC OSX we produce FAT library including both 32 and 64 bits - target_bits.append('32') + 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) @@ -175,6 +133,8 @@ def main(): os.makedirs(work_folder) print("work_folder: ", work_folder) os.chdir(work_folder) + if args.clean: + continue cmake = detect_cmake() if not cmake: @@ -191,7 +151,8 @@ def main(): run_shell('%s "%s" -G"%s" %s' % (cmake, work_dir, generator, " ".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 '') + ('-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' if args.verbose else ''), + ("-DITT_API_IPT_SUPPORT=1" if args.ptmark else "") ]))) if sys.platform == 'win32': target_project = 'ALL_BUILD' diff --git a/deps/v8/third_party/ittapi/include/ittnotify.f90 b/deps/v8/third_party/ittapi/include/fortran/posix/ittnotify.f90 similarity index 100% rename from deps/v8/third_party/ittapi/include/ittnotify.f90 rename to deps/v8/third_party/ittapi/include/fortran/posix/ittnotify.f90 diff --git a/deps/v8/third_party/ittapi/include/fortran/posix/x86/ittfortran.o b/deps/v8/third_party/ittapi/include/fortran/posix/x86/ittfortran.o new file mode 100644 index 00000000000000..2e31afe292f8ab Binary files /dev/null and b/deps/v8/third_party/ittapi/include/fortran/posix/x86/ittfortran.o differ diff --git a/deps/v8/third_party/ittapi/include/fortran/posix/x86/ittnotify.mod b/deps/v8/third_party/ittapi/include/fortran/posix/x86/ittnotify.mod new file mode 100644 index 00000000000000..80e31c29013933 Binary files /dev/null and b/deps/v8/third_party/ittapi/include/fortran/posix/x86/ittnotify.mod differ diff --git a/deps/v8/third_party/ittapi/include/fortran/posix/x86_64/ittfortran.o b/deps/v8/third_party/ittapi/include/fortran/posix/x86_64/ittfortran.o new file mode 100644 index 00000000000000..7986c096b9d9ec Binary files /dev/null and b/deps/v8/third_party/ittapi/include/fortran/posix/x86_64/ittfortran.o differ diff --git a/deps/v8/third_party/ittapi/include/fortran/posix/x86_64/ittnotify.mod b/deps/v8/third_party/ittapi/include/fortran/posix/x86_64/ittnotify.mod new file mode 100644 index 00000000000000..5655e55d05e8a4 Binary files /dev/null and b/deps/v8/third_party/ittapi/include/fortran/posix/x86_64/ittnotify.mod differ diff --git a/deps/v8/third_party/ittapi/include/fortran/win32/ittnotify.f90 b/deps/v8/third_party/ittapi/include/fortran/win32/ittnotify.f90 new file mode 100644 index 00000000000000..ebbcd3d3100035 --- /dev/null +++ b/deps/v8/third_party/ittapi/include/fortran/win32/ittnotify.f90 @@ -0,0 +1,522 @@ +! ======================================================================== +! +! 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. +! +! ======================================================================== +! + +!-------- +! +! 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 + diff --git a/deps/v8/third_party/ittapi/include/fortran/win32/x86/ittfortran.obj b/deps/v8/third_party/ittapi/include/fortran/win32/x86/ittfortran.obj new file mode 100644 index 00000000000000..4e9acc8bb1e819 Binary files /dev/null and b/deps/v8/third_party/ittapi/include/fortran/win32/x86/ittfortran.obj differ diff --git a/deps/v8/third_party/ittapi/include/fortran/win32/x86/ittnotify.mod b/deps/v8/third_party/ittapi/include/fortran/win32/x86/ittnotify.mod new file mode 100644 index 00000000000000..f8b871f24bfe4d Binary files /dev/null and b/deps/v8/third_party/ittapi/include/fortran/win32/x86/ittnotify.mod differ diff --git a/deps/v8/third_party/ittapi/include/fortran/win32/x86_64/ittfortran.obj b/deps/v8/third_party/ittapi/include/fortran/win32/x86_64/ittfortran.obj new file mode 100644 index 00000000000000..9cb6b912bfcd60 Binary files /dev/null and b/deps/v8/third_party/ittapi/include/fortran/win32/x86_64/ittfortran.obj differ diff --git a/deps/v8/third_party/ittapi/include/fortran/win32/x86_64/ittnotify.mod b/deps/v8/third_party/ittapi/include/fortran/win32/x86_64/ittnotify.mod new file mode 100644 index 00000000000000..b663395706a3c8 Binary files /dev/null and b/deps/v8/third_party/ittapi/include/fortran/win32/x86_64/ittnotify.mod differ diff --git a/deps/v8/third_party/ittapi/include/ittnotify.h b/deps/v8/third_party/ittapi/include/ittnotify.h index c3702572d8c9e1..0a9e007b701d9e 100644 --- a/deps/v8/third_party/ittapi/include/ittnotify.h +++ b/deps/v8/third_party/ittapi/include/ittnotify.h @@ -1,60 +1,8 @@ -/* - 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 (C) 2005-2019 Intel Corporation + + SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +*/ #ifndef _ITTNOTIFY_H_ #define _ITTNOTIFY_H_ @@ -228,7 +176,12 @@ The same ID may not be reused for different instances, unless a previous #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 */ /* @@ -1577,7 +1530,7 @@ ITT_STUBV(ITTAPI, void, heap_allocate_end, (__itt_heap_function h, void** addr, /** @endcond */ /** - * @brief Record an free begin occurrence. + * @brief Record a free begin occurrence. */ void ITTAPI __itt_heap_free_begin(__itt_heap_function h, void* addr); @@ -1597,7 +1550,7 @@ ITT_STUBV(ITTAPI, void, heap_free_begin, (__itt_heap_function h, void* addr)) /** @endcond */ /** - * @brief Record an free end occurrence. + * @brief Record a free end occurrence. */ void ITTAPI __itt_heap_free_end(__itt_heap_function h, void* addr); @@ -1617,7 +1570,7 @@ ITT_STUBV(ITTAPI, void, heap_free_end, (__itt_heap_function h, void* addr)) /** @endcond */ /** - * @brief Record an reallocation begin occurrence. + * @brief Record a reallocation begin occurrence. */ void ITTAPI __itt_heap_reallocate_begin(__itt_heap_function h, void* addr, size_t new_size, int initialized); @@ -1637,7 +1590,7 @@ ITT_STUBV(ITTAPI, void, heap_reallocate_begin, (__itt_heap_function h, void* add /** @endcond */ /** - * @brief Record an reallocation end occurrence. + * @brief Record a reallocation end occurrence. */ void ITTAPI __itt_heap_reallocate_end(__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized); @@ -2773,7 +2726,7 @@ ITT_STUB(ITTAPI, __itt_clock_domain*, clock_domain_create, (__itt_get_clock_info /** * @ingroup clockdomains - * @brief Recalculate clock domains frequences and clock base timestamps. + * @brief Recalculate clock domains frequencies and clock base timestamps. */ void ITTAPI __itt_clock_domain_reset(void); @@ -4256,7 +4209,7 @@ ITT_STUB(ITTAPI, __itt_caller, stack_caller_create, (void)) /** @endcond */ /** - * @brief Destroy the inforamtion about stitch point identified by the pointer previously returned by __itt_stack_caller_create() + * @brief Destroy the information about stitch point identified by the pointer previously returned by __itt_stack_caller_create() */ void ITTAPI __itt_stack_caller_destroy(__itt_caller id); diff --git a/deps/v8/third_party/ittapi/include/jitprofiling.h b/deps/v8/third_party/ittapi/include/jitprofiling.h index 9225f829f32b2c..ffda0048d05a4e 100644 --- a/deps/v8/third_party/ittapi/include/jitprofiling.h +++ b/deps/v8/third_party/ittapi/include/jitprofiling.h @@ -1,60 +1,8 @@ -/* - 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 (C) 2005-2019 Intel Corporation + + SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +*/ #ifndef __JITPROFILING_H__ #define __JITPROFILING_H__ diff --git a/deps/v8/third_party/ittapi/include/legacy/ittnotify.h b/deps/v8/third_party/ittapi/include/legacy/ittnotify.h index 10013f227559a0..75ee4e4edcf8be 100644 --- a/deps/v8/third_party/ittapi/include/legacy/ittnotify.h +++ b/deps/v8/third_party/ittapi/include/legacy/ittnotify.h @@ -1,60 +1,8 @@ -/* - 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 (C) 2005-2019 Intel Corporation + + SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +*/ #ifndef _LEGACY_ITTNOTIFY_H_ #define _LEGACY_ITTNOTIFY_H_ @@ -167,7 +115,12 @@ #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 */ /* @@ -1005,9 +958,9 @@ ITT_STUB(ITTAPI, __itt_frame, frame_create, (const char *domain)) #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ -/** @brief Record an frame begin occurrence. */ +/** @brief Record a frame begin occurrence. */ void ITTAPI __itt_frame_begin(__itt_frame frame); -/** @brief Record an frame end occurrence. */ +/** @brief Record a frame end occurrence. */ void ITTAPI __itt_frame_end (__itt_frame frame); /** @cond exclude_from_documentation */ diff --git a/deps/v8/third_party/ittapi/include/libittnotify.h b/deps/v8/third_party/ittapi/include/libittnotify.h index 3c0a26b70f9f6f..107949aa7668d3 100644 --- a/deps/v8/third_party/ittapi/include/libittnotify.h +++ b/deps/v8/third_party/ittapi/include/libittnotify.h @@ -1,60 +1,8 @@ -/* - This file is provided under a dual BSD/GPLv2 license. When using or - redistributing this file, you may do so under either license. +/* + Copyright (C) 2005-2019 Intel Corporation - 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. - */ + SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +*/ #ifndef _LIBITTNOTIFY_H_ #define _LIBITTNOTIFY_H_ diff --git a/deps/v8/third_party/ittapi/ittapi-rs/.gitignore b/deps/v8/third_party/ittapi/ittapi-rs/.gitignore new file mode 100644 index 00000000000000..693699042b1a8c --- /dev/null +++ b/deps/v8/third_party/ittapi/ittapi-rs/.gitignore @@ -0,0 +1,3 @@ +/target +**/*.rs.bk +Cargo.lock diff --git a/deps/v8/third_party/ittapi/ittapi-rs/CMakeLists.txt b/deps/v8/third_party/ittapi/ittapi-rs/CMakeLists.txt new file mode 120000 index 00000000000000..de0cf227139ff6 --- /dev/null +++ b/deps/v8/third_party/ittapi/ittapi-rs/CMakeLists.txt @@ -0,0 +1 @@ +../CMakeLists.txt \ No newline at end of file diff --git a/deps/v8/third_party/ittapi/ittapi-rs/Cargo.toml b/deps/v8/third_party/ittapi/ittapi-rs/Cargo.toml new file mode 100644 index 00000000000000..b85ab97b22135a --- /dev/null +++ b/deps/v8/third_party/ittapi/ittapi-rs/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "ittapi-rs" +version = "0.1.5" +authors = ["Johnnie Birch <45402135+jlb6740@users.noreply.github.com>"] +edition = "2018" +description = "Rust bindings for ittapi" +license-file = "LICENSES/" +documentation = "https://docs.rs/ittapi-rs" +homepage = "https://github.com/intel/ittapi/ittapi-rs" +repository = "https://github.com/intel/ittapi" + +[dependencies] + +[features] +force_32 = [] + +[build-dependencies] +cmake = "0.1.42" + +[dev-dependencies] +bindgen = "0.52.0" +diff = "0.1" diff --git a/deps/v8/third_party/ittapi/ittapi-rs/LICENSES b/deps/v8/third_party/ittapi/ittapi-rs/LICENSES new file mode 120000 index 00000000000000..a274e110699818 --- /dev/null +++ b/deps/v8/third_party/ittapi/ittapi-rs/LICENSES @@ -0,0 +1 @@ +../LICENSES/ \ No newline at end of file diff --git a/deps/v8/third_party/ittapi/ittapi-rs/README.md b/deps/v8/third_party/ittapi/ittapi-rs/README.md new file mode 100644 index 00000000000000..69340620786847 --- /dev/null +++ b/deps/v8/third_party/ittapi/ittapi-rs/README.md @@ -0,0 +1,14 @@ +# ittapi-rs +This package creates Rust bindings for ittapi. Ittapi is used for instrumentation and tracking and just-in-time profiling. + +Note the building of this package is currently only supported (tested) on a couple of Linux platforms (recent Ubuntu and Fedora builds) but support for other platforms is intended and contributions are welcomed. + +# Build the package +cargo build + +** Note This package uses bindgen which in turn requires recent versions of cmake and llvm to be installed. For Fedora, "yum install llvm-devel" was needed to bring in llvm-config. + +** Also note building this package requires rust nightly. + +# Publish the package to crates.io +cargo publish \ No newline at end of file diff --git a/deps/v8/third_party/ittapi/ittapi-rs/build.rs b/deps/v8/third_party/ittapi/ittapi-rs/build.rs new file mode 100644 index 00000000000000..549afe2ec108f2 --- /dev/null +++ b/deps/v8/third_party/ittapi/ittapi-rs/build.rs @@ -0,0 +1,37 @@ +#![allow(unused)] +use cmake::Config; +use std::env; +use std::path::PathBuf; + +#[cfg(target_os = "windows")] +fn main() {} + +#[cfg(not(target_os = "windows"))] +fn main() { + let out_dir = env::var("OUT_DIR").unwrap(); + let out_path = PathBuf::from(out_dir); + + #[cfg(not(feature = "force_32"))] + { + let _ittnotify_64 = Config::new("./") + .generator("Unix Makefiles") + .no_build_target(true) + .build(); + + println!("cargo:rustc-link-search={}/build/bin/", out_path.display()); + println!("cargo:rustc-link-lib=static=ittnotify"); + } + + #[cfg(feature = "force_32")] + #[cfg(not(any(target_os = "ios", target_os = "macos")))] + { + let _ittnotify_32 = Config::new("./") + .generator("Unix Makefiles") + .define("FORCE_32", "ON") + .no_build_target(true) + .build(); + + println!("cargo:rustc-link-search={}/build/bin/", out_path.display()); + println!("cargo:rustc-link-lib=static=ittnotify32"); + } +} diff --git a/deps/v8/third_party/ittapi/ittapi-rs/include b/deps/v8/third_party/ittapi/ittapi-rs/include new file mode 120000 index 00000000000000..3a1af68fd1cdb6 --- /dev/null +++ b/deps/v8/third_party/ittapi/ittapi-rs/include @@ -0,0 +1 @@ +../include/ \ No newline at end of file diff --git a/deps/v8/third_party/ittapi/ittapi-rs/src/ittnotify b/deps/v8/third_party/ittapi/ittapi-rs/src/ittnotify new file mode 120000 index 00000000000000..4859c0fe8132b0 --- /dev/null +++ b/deps/v8/third_party/ittapi/ittapi-rs/src/ittnotify @@ -0,0 +1 @@ +../../src/ittnotify \ No newline at end of file diff --git a/deps/v8/third_party/ittapi/ittapi-rs/src/ittnotify_bindings.rs b/deps/v8/third_party/ittapi/ittapi-rs/src/ittnotify_bindings.rs new file mode 100644 index 00000000000000..a5b45f4b30e32e --- /dev/null +++ b/deps/v8/third_party/ittapi/ittapi-rs/src/ittnotify_bindings.rs @@ -0,0 +1,2987 @@ +/* automatically generated by rust-bindgen */ + +pub const ITT_OS_WIN: u32 = 1; +pub const ITT_OS_LINUX: u32 = 2; +pub const ITT_OS_MAC: u32 = 3; +pub const ITT_OS_FREEBSD: u32 = 4; +pub const ITT_OS: u32 = 2; +pub const ITT_PLATFORM_WIN: u32 = 1; +pub const ITT_PLATFORM_POSIX: u32 = 2; +pub const ITT_PLATFORM_MAC: u32 = 3; +pub const ITT_PLATFORM_FREEBSD: u32 = 4; +pub const ITT_PLATFORM: u32 = 2; +pub const _STDINT_H: u32 = 1; +pub const _FEATURES_H: u32 = 1; +pub const _DEFAULT_SOURCE: u32 = 1; +pub const __USE_ISOC11: u32 = 1; +pub const __USE_ISOC99: u32 = 1; +pub const __USE_ISOC95: u32 = 1; +pub const __USE_POSIX_IMPLICITLY: u32 = 1; +pub const _POSIX_SOURCE: u32 = 1; +pub const _POSIX_C_SOURCE: u32 = 200809; +pub const __USE_POSIX: u32 = 1; +pub const __USE_POSIX2: u32 = 1; +pub const __USE_POSIX199309: u32 = 1; +pub const __USE_POSIX199506: u32 = 1; +pub const __USE_XOPEN2K: u32 = 1; +pub const __USE_XOPEN2K8: u32 = 1; +pub const _ATFILE_SOURCE: u32 = 1; +pub const __USE_MISC: u32 = 1; +pub const __USE_ATFILE: u32 = 1; +pub const __USE_FORTIFY_LEVEL: u32 = 0; +pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; +pub const _STDC_PREDEF_H: u32 = 1; +pub const __STDC_IEC_559__: u32 = 1; +pub const __STDC_IEC_559_COMPLEX__: u32 = 1; +pub const __STDC_ISO_10646__: u32 = 201706; +pub const __STDC_NO_THREADS__: u32 = 1; +pub const __GNU_LIBRARY__: u32 = 6; +pub const __GLIBC__: u32 = 2; +pub const __GLIBC_MINOR__: u32 = 27; +pub const _SYS_CDEFS_H: u32 = 1; +pub const __glibc_c99_flexarr_available: u32 = 1; +pub const __WORDSIZE: u32 = 64; +pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; +pub const __SYSCALL_WORDSIZE: u32 = 64; +pub const __HAVE_GENERIC_SELECTION: u32 = 1; +pub const __GLIBC_USE_LIB_EXT2: u32 = 0; +pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0; +pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0; +pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0; +pub const _BITS_TYPES_H: u32 = 1; +pub const _BITS_TYPESIZES_H: u32 = 1; +pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; +pub const __INO_T_MATCHES_INO64_T: u32 = 1; +pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; +pub const __FD_SETSIZE: u32 = 1024; +pub const _BITS_WCHAR_H: u32 = 1; +pub const _BITS_STDINT_INTN_H: u32 = 1; +pub const _BITS_STDINT_UINTN_H: u32 = 1; +pub const INT8_MIN: i32 = -128; +pub const INT16_MIN: i32 = -32768; +pub const INT32_MIN: i32 = -2147483648; +pub const INT8_MAX: u32 = 127; +pub const INT16_MAX: u32 = 32767; +pub const INT32_MAX: u32 = 2147483647; +pub const UINT8_MAX: u32 = 255; +pub const UINT16_MAX: u32 = 65535; +pub const UINT32_MAX: u32 = 4294967295; +pub const INT_LEAST8_MIN: i32 = -128; +pub const INT_LEAST16_MIN: i32 = -32768; +pub const INT_LEAST32_MIN: i32 = -2147483648; +pub const INT_LEAST8_MAX: u32 = 127; +pub const INT_LEAST16_MAX: u32 = 32767; +pub const INT_LEAST32_MAX: u32 = 2147483647; +pub const UINT_LEAST8_MAX: u32 = 255; +pub const UINT_LEAST16_MAX: u32 = 65535; +pub const UINT_LEAST32_MAX: u32 = 4294967295; +pub const INT_FAST8_MIN: i32 = -128; +pub const INT_FAST16_MIN: i64 = -9223372036854775808; +pub const INT_FAST32_MIN: i64 = -9223372036854775808; +pub const INT_FAST8_MAX: u32 = 127; +pub const INT_FAST16_MAX: u64 = 9223372036854775807; +pub const INT_FAST32_MAX: u64 = 9223372036854775807; +pub const UINT_FAST8_MAX: u32 = 255; +pub const UINT_FAST16_MAX: i32 = -1; +pub const UINT_FAST32_MAX: i32 = -1; +pub const INTPTR_MIN: i64 = -9223372036854775808; +pub const INTPTR_MAX: u64 = 9223372036854775807; +pub const UINTPTR_MAX: i32 = -1; +pub const PTRDIFF_MIN: i64 = -9223372036854775808; +pub const PTRDIFF_MAX: u64 = 9223372036854775807; +pub const SIG_ATOMIC_MIN: i32 = -2147483648; +pub const SIG_ATOMIC_MAX: u32 = 2147483647; +pub const SIZE_MAX: i32 = -1; +pub const WINT_MIN: u32 = 0; +pub const WINT_MAX: u32 = 4294967295; +pub const ITT_MAJOR: u32 = 3; +pub const ITT_MINOR: u32 = 0; +pub const __itt_suppress_all_errors: u32 = 2147483647; +pub const __itt_suppress_threading_errors: u32 = 255; +pub const __itt_suppress_memory_errors: u32 = 65280; +pub const __itt_attr_barrier: u32 = 1; +pub const __itt_attr_mutex: u32 = 2; +pub const __itt_heap_leaks: u32 = 1; +pub const __itt_heap_growth: u32 = 2; +pub const __itt_section_exec: u32 = 536870912; +pub const __itt_section_read: u32 = 1073741824; +pub const __itt_section_write: u32 = 2147483648; +pub type wchar_t = ::std::os::raw::c_int; +#[repr(C)] +#[repr(align(16))] +#[derive(Debug, Copy, Clone)] +pub struct max_align_t { + pub __clang_max_align_nonce1: ::std::os::raw::c_longlong, + pub __bindgen_padding_0: u64, + pub __clang_max_align_nonce2: u128, +} +#[test] +fn bindgen_test_layout_max_align_t() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(max_align_t)) + ); + assert_eq!( + ::std::mem::align_of::(), + 16usize, + concat!("Alignment of ", stringify!(max_align_t)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).__clang_max_align_nonce1 as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(max_align_t), + "::", + stringify!(__clang_max_align_nonce1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).__clang_max_align_nonce2 as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(max_align_t), + "::", + stringify!(__clang_max_align_nonce2) + ) + ); +} +pub type __u_char = ::std::os::raw::c_uchar; +pub type __u_short = ::std::os::raw::c_ushort; +pub type __u_int = ::std::os::raw::c_uint; +pub type __u_long = ::std::os::raw::c_ulong; +pub type __int8_t = ::std::os::raw::c_schar; +pub type __uint8_t = ::std::os::raw::c_uchar; +pub type __int16_t = ::std::os::raw::c_short; +pub type __uint16_t = ::std::os::raw::c_ushort; +pub type __int32_t = ::std::os::raw::c_int; +pub type __uint32_t = ::std::os::raw::c_uint; +pub type __int64_t = ::std::os::raw::c_long; +pub type __uint64_t = ::std::os::raw::c_ulong; +pub type __quad_t = ::std::os::raw::c_long; +pub type __u_quad_t = ::std::os::raw::c_ulong; +pub type __intmax_t = ::std::os::raw::c_long; +pub type __uintmax_t = ::std::os::raw::c_ulong; +pub type __dev_t = ::std::os::raw::c_ulong; +pub type __uid_t = ::std::os::raw::c_uint; +pub type __gid_t = ::std::os::raw::c_uint; +pub type __ino_t = ::std::os::raw::c_ulong; +pub type __ino64_t = ::std::os::raw::c_ulong; +pub type __mode_t = ::std::os::raw::c_uint; +pub type __nlink_t = ::std::os::raw::c_ulong; +pub type __off_t = ::std::os::raw::c_long; +pub type __off64_t = ::std::os::raw::c_long; +pub type __pid_t = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __fsid_t { + pub __val: [::std::os::raw::c_int; 2usize], +} +#[test] +fn bindgen_test_layout___fsid_t() { + assert_eq!( + ::std::mem::size_of::<__fsid_t>(), + 8usize, + concat!("Size of: ", stringify!(__fsid_t)) + ); + assert_eq!( + ::std::mem::align_of::<__fsid_t>(), + 4usize, + concat!("Alignment of ", stringify!(__fsid_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<__fsid_t>())).__val as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__fsid_t), + "::", + stringify!(__val) + ) + ); +} +pub type __clock_t = ::std::os::raw::c_long; +pub type __rlim_t = ::std::os::raw::c_ulong; +pub type __rlim64_t = ::std::os::raw::c_ulong; +pub type __id_t = ::std::os::raw::c_uint; +pub type __time_t = ::std::os::raw::c_long; +pub type __useconds_t = ::std::os::raw::c_uint; +pub type __suseconds_t = ::std::os::raw::c_long; +pub type __daddr_t = ::std::os::raw::c_int; +pub type __key_t = ::std::os::raw::c_int; +pub type __clockid_t = ::std::os::raw::c_int; +pub type __timer_t = *mut ::std::os::raw::c_void; +pub type __blksize_t = ::std::os::raw::c_long; +pub type __blkcnt_t = ::std::os::raw::c_long; +pub type __blkcnt64_t = ::std::os::raw::c_long; +pub type __fsblkcnt_t = ::std::os::raw::c_ulong; +pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; +pub type __fsfilcnt_t = ::std::os::raw::c_ulong; +pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; +pub type __fsword_t = ::std::os::raw::c_long; +pub type __ssize_t = ::std::os::raw::c_long; +pub type __syscall_slong_t = ::std::os::raw::c_long; +pub type __syscall_ulong_t = ::std::os::raw::c_ulong; +pub type __loff_t = __off64_t; +pub type __caddr_t = *mut ::std::os::raw::c_char; +pub type __intptr_t = ::std::os::raw::c_long; +pub type __socklen_t = ::std::os::raw::c_uint; +pub type __sig_atomic_t = ::std::os::raw::c_int; +pub type int_least8_t = ::std::os::raw::c_schar; +pub type int_least16_t = ::std::os::raw::c_short; +pub type int_least32_t = ::std::os::raw::c_int; +pub type int_least64_t = ::std::os::raw::c_long; +pub type uint_least8_t = ::std::os::raw::c_uchar; +pub type uint_least16_t = ::std::os::raw::c_ushort; +pub type uint_least32_t = ::std::os::raw::c_uint; +pub type uint_least64_t = ::std::os::raw::c_ulong; +pub type int_fast8_t = ::std::os::raw::c_schar; +pub type int_fast16_t = ::std::os::raw::c_long; +pub type int_fast32_t = ::std::os::raw::c_long; +pub type int_fast64_t = ::std::os::raw::c_long; +pub type uint_fast8_t = ::std::os::raw::c_uchar; +pub type uint_fast16_t = ::std::os::raw::c_ulong; +pub type uint_fast32_t = ::std::os::raw::c_ulong; +pub type uint_fast64_t = ::std::os::raw::c_ulong; +pub type intmax_t = __intmax_t; +pub type uintmax_t = __uintmax_t; +extern "C" { + #[doc = " @defgroup control Collection Control"] + #[doc = " @ingroup public"] + #[doc = " General behavior: application continues to run, but no profiling information is being collected"] + #[doc = ""] + #[doc = " Pausing occurs not only for the current thread but for all process as well as spawned processes"] + #[doc = " - Intel(R) Parallel Inspector and Intel(R) Inspector XE:"] + #[doc = " - Does not analyze or report errors that involve memory access."] + #[doc = " - Other errors are reported as usual. Pausing data collection in"] + #[doc = " Intel(R) Parallel Inspector and Intel(R) Inspector XE"] + #[doc = " only pauses tracing and analyzing memory access."] + #[doc = " It does not pause tracing or analyzing threading APIs."] + #[doc = " ."] + #[doc = " - Intel(R) Parallel Amplifier and Intel(R) VTune(TM) Amplifier XE:"] + #[doc = " - Does continue to record when new threads are started."] + #[doc = " ."] + #[doc = " - Other effects:"] + #[doc = " - Possible reduction of runtime overhead."] + #[doc = " ."] + #[doc = " @{"] + pub fn __itt_pause(); +} +extern "C" { + #[doc = " @brief Resume collection"] + pub fn __itt_resume(); +} +extern "C" { + #[doc = " @brief Detach collection"] + pub fn __itt_detach(); +} +pub type __itt_pause_ptr__3_0_t = ::std::option::Option; +extern "C" { + pub static mut __itt_pause_ptr__3_0: __itt_pause_ptr__3_0_t; +} +pub type __itt_resume_ptr__3_0_t = ::std::option::Option; +extern "C" { + pub static mut __itt_resume_ptr__3_0: __itt_resume_ptr__3_0_t; +} +pub type __itt_detach_ptr__3_0_t = ::std::option::Option; +extern "C" { + pub static mut __itt_detach_ptr__3_0: __itt_detach_ptr__3_0_t; +} +#[doc = " @defgroup Intel Processor Trace control"] +#[doc = " API from this group provides control over collection and analysis of Intel Processor Trace (Intel PT) data"] +#[doc = " Information about Intel Processor Trace technology can be found here (Volume 3 chapter 35):"] +#[doc = " https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf"] +#[doc = " Use this API to mark particular code regions for loading detailed performance statistics."] +#[doc = " This mode makes your analysis faster and more accurate."] +#[doc = " @{"] +pub type __itt_pt_region = ::std::os::raw::c_uchar; +extern "C" { + pub fn __itt_pt_region_create(name: *const ::std::os::raw::c_char) -> __itt_pt_region; +} +pub type __itt_pt_region_create_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(name: *const ::std::os::raw::c_char) -> __itt_pt_region, +>; +extern "C" { + pub static mut __itt_pt_region_create_ptr__3_0: __itt_pt_region_create_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief function contains a special code pattern identified on the post-processing stage and"] + #[doc = " marks the beginning of a code region targeted for Intel PT analysis"] + #[doc = " @param[in] region - region id, 0 <= region < 8"] + pub fn __itt_mark_pt_region_begin(region: __itt_pt_region); +} +extern "C" { + #[doc = " @brief function contains a special code pattern identified on the post-processing stage and"] + #[doc = " marks the end of a code region targeted for Intel PT analysis"] + #[doc = " @param[in] region - region id, 0 <= region < 8"] + pub fn __itt_mark_pt_region_end(region: __itt_pt_region); +} +extern "C" { + pub fn __itt_thread_set_name(name: *const ::std::os::raw::c_char); +} +pub type __itt_thread_set_name_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_thread_set_name_ptr__3_0: __itt_thread_set_name_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Mark current thread as ignored from this point on, for the duration of its existence."] + pub fn __itt_thread_ignore(); +} +pub type __itt_thread_ignore_ptr__3_0_t = ::std::option::Option; +extern "C" { + pub static mut __itt_thread_ignore_ptr__3_0: __itt_thread_ignore_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Start suppressing errors identified in mask on this thread"] + pub fn __itt_suppress_push(mask: ::std::os::raw::c_uint); +} +pub type __itt_suppress_push_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_suppress_push_ptr__3_0: __itt_suppress_push_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Undo the effects of the matching call to __itt_suppress_push"] + pub fn __itt_suppress_pop(); +} +pub type __itt_suppress_pop_ptr__3_0_t = ::std::option::Option; +extern "C" { + pub static mut __itt_suppress_pop_ptr__3_0: __itt_suppress_pop_ptr__3_0_t; +} +pub const __itt_suppress_mode___itt_unsuppress_range: __itt_suppress_mode = 0; +pub const __itt_suppress_mode___itt_suppress_range: __itt_suppress_mode = 1; +#[doc = " @enum __itt_model_disable"] +#[doc = " @brief Enumerator for the disable methods"] +pub type __itt_suppress_mode = u32; +pub use self::__itt_suppress_mode as __itt_suppress_mode_t; +extern "C" { + #[doc = " @brief Mark a range of memory for error suppression or unsuppression for error types included in mask"] + pub fn __itt_suppress_mark_range( + mode: __itt_suppress_mode_t, + mask: ::std::os::raw::c_uint, + address: *mut ::std::os::raw::c_void, + size: usize, + ); +} +pub type __itt_suppress_mark_range_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + mode: __itt_suppress_mode_t, + mask: ::std::os::raw::c_uint, + address: *mut ::std::os::raw::c_void, + size: usize, + ), +>; +extern "C" { + pub static mut __itt_suppress_mark_range_ptr__3_0: __itt_suppress_mark_range_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Undo the effect of a matching call to __itt_suppress_mark_range. If not matching"] + #[doc = " call is found, nothing is changed."] + pub fn __itt_suppress_clear_range( + mode: __itt_suppress_mode_t, + mask: ::std::os::raw::c_uint, + address: *mut ::std::os::raw::c_void, + size: usize, + ); +} +pub type __itt_suppress_clear_range_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + mode: __itt_suppress_mode_t, + mask: ::std::os::raw::c_uint, + address: *mut ::std::os::raw::c_void, + size: usize, + ), +>; +extern "C" { + pub static mut __itt_suppress_clear_range_ptr__3_0: __itt_suppress_clear_range_ptr__3_0_t; +} +extern "C" { + pub fn __itt_sync_create( + addr: *mut ::std::os::raw::c_void, + objtype: *const ::std::os::raw::c_char, + objname: *const ::std::os::raw::c_char, + attribute: ::std::os::raw::c_int, + ); +} +pub type __itt_sync_create_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + addr: *mut ::std::os::raw::c_void, + objtype: *const ::std::os::raw::c_char, + objname: *const ::std::os::raw::c_char, + attribute: ::std::os::raw::c_int, + ), +>; +extern "C" { + pub static mut __itt_sync_create_ptr__3_0: __itt_sync_create_ptr__3_0_t; +} +extern "C" { + pub fn __itt_sync_rename( + addr: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + ); +} +pub type __itt_sync_rename_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(addr: *mut ::std::os::raw::c_void, name: *const ::std::os::raw::c_char), +>; +extern "C" { + pub static mut __itt_sync_rename_ptr__3_0: __itt_sync_rename_ptr__3_0_t; +} +extern "C" { + #[doc = "@brief Destroy a synchronization object."] + #[doc = "@param addr Handle for the synchronization object."] + pub fn __itt_sync_destroy(addr: *mut ::std::os::raw::c_void); +} +pub type __itt_sync_destroy_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_sync_destroy_ptr__3_0: __itt_sync_destroy_ptr__3_0_t; +} +extern "C" { + #[doc = " @name group of functions is used for performance measurement tools"] + #[doc = " @brief Enter spin loop on user-defined sync object"] + pub fn __itt_sync_prepare(addr: *mut ::std::os::raw::c_void); +} +pub type __itt_sync_prepare_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_sync_prepare_ptr__3_0: __itt_sync_prepare_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Quit spin loop without acquiring spin object"] + pub fn __itt_sync_cancel(addr: *mut ::std::os::raw::c_void); +} +pub type __itt_sync_cancel_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_sync_cancel_ptr__3_0: __itt_sync_cancel_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Successful spin loop completion (sync object acquired)"] + pub fn __itt_sync_acquired(addr: *mut ::std::os::raw::c_void); +} +pub type __itt_sync_acquired_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_sync_acquired_ptr__3_0: __itt_sync_acquired_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Start sync object releasing code. Is called before the lock release call."] + pub fn __itt_sync_releasing(addr: *mut ::std::os::raw::c_void); +} +pub type __itt_sync_releasing_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_sync_releasing_ptr__3_0: __itt_sync_releasing_ptr__3_0_t; +} +extern "C" { + #[doc = " @name group of functions is used for correctness checking tools"] + #[doc = " @ingroup legacy"] + #[doc = " @deprecated Legacy API"] + #[doc = " @brief Fast synchronization which does no require spinning."] + #[doc = " - This special function is to be used by TBB and OpenMP libraries only when they know"] + #[doc = " there is no spin but they need to suppress TC warnings about shared variable modifications."] + #[doc = " - It only has corresponding pointers in static library and does not have corresponding function"] + #[doc = " in dynamic library."] + #[doc = " @see void __itt_sync_prepare(void* addr);"] + pub fn __itt_fsync_prepare(addr: *mut ::std::os::raw::c_void); +} +pub type __itt_fsync_prepare_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_fsync_prepare_ptr__3_0: __itt_fsync_prepare_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup legacy"] + #[doc = " @deprecated Legacy API"] + #[doc = " @brief Fast synchronization which does no require spinning."] + #[doc = " - This special function is to be used by TBB and OpenMP libraries only when they know"] + #[doc = " there is no spin but they need to suppress TC warnings about shared variable modifications."] + #[doc = " - It only has corresponding pointers in static library and does not have corresponding function"] + #[doc = " in dynamic library."] + #[doc = " @see void __itt_sync_cancel(void *addr);"] + pub fn __itt_fsync_cancel(addr: *mut ::std::os::raw::c_void); +} +pub type __itt_fsync_cancel_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_fsync_cancel_ptr__3_0: __itt_fsync_cancel_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup legacy"] + #[doc = " @deprecated Legacy API"] + #[doc = " @brief Fast synchronization which does no require spinning."] + #[doc = " - This special function is to be used by TBB and OpenMP libraries only when they know"] + #[doc = " there is no spin but they need to suppress TC warnings about shared variable modifications."] + #[doc = " - It only has corresponding pointers in static library and does not have corresponding function"] + #[doc = " in dynamic library."] + #[doc = " @see void __itt_sync_acquired(void *addr);"] + pub fn __itt_fsync_acquired(addr: *mut ::std::os::raw::c_void); +} +pub type __itt_fsync_acquired_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_fsync_acquired_ptr__3_0: __itt_fsync_acquired_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup legacy"] + #[doc = " @deprecated Legacy API"] + #[doc = " @brief Fast synchronization which does no require spinning."] + #[doc = " - This special function is to be used by TBB and OpenMP libraries only when they know"] + #[doc = " there is no spin but they need to suppress TC warnings about shared variable modifications."] + #[doc = " - It only has corresponding pointers in static library and does not have corresponding function"] + #[doc = " in dynamic library."] + #[doc = " @see void __itt_sync_releasing(void* addr);"] + pub fn __itt_fsync_releasing(addr: *mut ::std::os::raw::c_void); +} +pub type __itt_fsync_releasing_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_fsync_releasing_ptr__3_0: __itt_fsync_releasing_ptr__3_0_t; +} +pub type __itt_model_site = *mut ::std::os::raw::c_void; +pub type __itt_model_site_instance = *mut ::std::os::raw::c_void; +pub type __itt_model_task = *mut ::std::os::raw::c_void; +pub type __itt_model_task_instance = *mut ::std::os::raw::c_void; +pub const __itt_model_disable___itt_model_disable_observation: __itt_model_disable = 0; +pub const __itt_model_disable___itt_model_disable_collection: __itt_model_disable = 1; +#[doc = " @enum __itt_model_disable"] +#[doc = " @brief Enumerator for the disable methods"] +pub type __itt_model_disable = u32; +extern "C" { + #[doc = " @brief ANNOTATE_SITE_BEGIN/ANNOTATE_SITE_END support."] + #[doc = ""] + #[doc = " site_begin/end model a potential concurrency site."] + #[doc = " site instances may be recursively nested with themselves."] + #[doc = " site_end exits the most recently started but unended site for the current"] + #[doc = " thread. The handle passed to end may be used to validate structure."] + #[doc = " Instances of a site encountered on different threads concurrently"] + #[doc = " are considered completely distinct. If the site name for two different"] + #[doc = " lexical sites match, it is unspecified whether they are treated as the"] + #[doc = " same or different for data presentation."] + pub fn __itt_model_site_begin( + site: *mut __itt_model_site, + instance: *mut __itt_model_site_instance, + name: *const ::std::os::raw::c_char, + ); +} +extern "C" { + pub fn __itt_model_site_beginA(name: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn __itt_model_site_beginAL(name: *const ::std::os::raw::c_char, siteNameLen: usize); +} +extern "C" { + pub fn __itt_model_site_end( + site: *mut __itt_model_site, + instance: *mut __itt_model_site_instance, + ); +} +extern "C" { + pub fn __itt_model_site_end_2(); +} +pub type __itt_model_site_begin_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + site: *mut __itt_model_site, + instance: *mut __itt_model_site_instance, + name: *const ::std::os::raw::c_char, + ), +>; +extern "C" { + pub static mut __itt_model_site_begin_ptr__3_0: __itt_model_site_begin_ptr__3_0_t; +} +pub type __itt_model_site_beginA_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_site_beginA_ptr__3_0: __itt_model_site_beginA_ptr__3_0_t; +} +pub type __itt_model_site_beginAL_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(name: *const ::std::os::raw::c_char, siteNameLen: usize), +>; +extern "C" { + pub static mut __itt_model_site_beginAL_ptr__3_0: __itt_model_site_beginAL_ptr__3_0_t; +} +pub type __itt_model_site_end_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(site: *mut __itt_model_site, instance: *mut __itt_model_site_instance), +>; +extern "C" { + pub static mut __itt_model_site_end_ptr__3_0: __itt_model_site_end_ptr__3_0_t; +} +pub type __itt_model_site_end_2_ptr__3_0_t = ::std::option::Option; +extern "C" { + pub static mut __itt_model_site_end_2_ptr__3_0: __itt_model_site_end_2_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief ANNOTATE_TASK_BEGIN/ANNOTATE_TASK_END support"] + #[doc = ""] + #[doc = " task_begin/end model a potential task, which is contained within the most"] + #[doc = " closely enclosing dynamic site. task_end exits the most recently started"] + #[doc = " but unended task. The handle passed to end may be used to validate"] + #[doc = " structure. It is unspecified if bad dynamic nesting is detected. If it"] + #[doc = " is, it should be encoded in the resulting data collection. The collector"] + #[doc = " should not fail due to construct nesting issues, nor attempt to directly"] + #[doc = " indicate the problem."] + pub fn __itt_model_task_begin( + task: *mut __itt_model_task, + instance: *mut __itt_model_task_instance, + name: *const ::std::os::raw::c_char, + ); +} +extern "C" { + pub fn __itt_model_task_beginA(name: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn __itt_model_task_beginAL(name: *const ::std::os::raw::c_char, taskNameLen: usize); +} +extern "C" { + pub fn __itt_model_iteration_taskA(name: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn __itt_model_iteration_taskAL(name: *const ::std::os::raw::c_char, taskNameLen: usize); +} +extern "C" { + pub fn __itt_model_task_end( + task: *mut __itt_model_task, + instance: *mut __itt_model_task_instance, + ); +} +extern "C" { + pub fn __itt_model_task_end_2(); +} +pub type __itt_model_task_begin_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + task: *mut __itt_model_task, + instance: *mut __itt_model_task_instance, + name: *const ::std::os::raw::c_char, + ), +>; +extern "C" { + pub static mut __itt_model_task_begin_ptr__3_0: __itt_model_task_begin_ptr__3_0_t; +} +pub type __itt_model_task_beginA_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_task_beginA_ptr__3_0: __itt_model_task_beginA_ptr__3_0_t; +} +pub type __itt_model_task_beginAL_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: usize), +>; +extern "C" { + pub static mut __itt_model_task_beginAL_ptr__3_0: __itt_model_task_beginAL_ptr__3_0_t; +} +pub type __itt_model_iteration_taskA_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_iteration_taskA_ptr__3_0: __itt_model_iteration_taskA_ptr__3_0_t; +} +pub type __itt_model_iteration_taskAL_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(name: *const ::std::os::raw::c_char, taskNameLen: usize), +>; +extern "C" { + pub static mut __itt_model_iteration_taskAL_ptr__3_0: __itt_model_iteration_taskAL_ptr__3_0_t; +} +pub type __itt_model_task_end_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(task: *mut __itt_model_task, instance: *mut __itt_model_task_instance), +>; +extern "C" { + pub static mut __itt_model_task_end_ptr__3_0: __itt_model_task_end_ptr__3_0_t; +} +pub type __itt_model_task_end_2_ptr__3_0_t = ::std::option::Option; +extern "C" { + pub static mut __itt_model_task_end_2_ptr__3_0: __itt_model_task_end_2_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief ANNOTATE_LOCK_ACQUIRE/ANNOTATE_LOCK_RELEASE support"] + #[doc = ""] + #[doc = " lock_acquire/release model a potential lock for both lockset and"] + #[doc = " performance modeling. Each unique address is modeled as a separate"] + #[doc = " lock, with invalid addresses being valid lock IDs. Specifically:"] + #[doc = " no storage is accessed by the API at the specified address - it is only"] + #[doc = " used for lock identification. Lock acquires may be self-nested and are"] + #[doc = " unlocked by a corresponding number of releases."] + #[doc = " (These closely correspond to __itt_sync_acquired/__itt_sync_releasing,"] + #[doc = " but may not have identical semantics.)"] + pub fn __itt_model_lock_acquire(lock: *mut ::std::os::raw::c_void); +} +extern "C" { + pub fn __itt_model_lock_acquire_2(lock: *mut ::std::os::raw::c_void); +} +extern "C" { + pub fn __itt_model_lock_release(lock: *mut ::std::os::raw::c_void); +} +extern "C" { + pub fn __itt_model_lock_release_2(lock: *mut ::std::os::raw::c_void); +} +pub type __itt_model_lock_acquire_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_lock_acquire_ptr__3_0: __itt_model_lock_acquire_ptr__3_0_t; +} +pub type __itt_model_lock_acquire_2_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_lock_acquire_2_ptr__3_0: __itt_model_lock_acquire_2_ptr__3_0_t; +} +pub type __itt_model_lock_release_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_lock_release_ptr__3_0: __itt_model_lock_release_ptr__3_0_t; +} +pub type __itt_model_lock_release_2_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_lock_release_2_ptr__3_0: __itt_model_lock_release_2_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief ANNOTATE_RECORD_ALLOCATION/ANNOTATE_RECORD_DEALLOCATION support"] + #[doc = ""] + #[doc = " record_allocation/deallocation describe user-defined memory allocator"] + #[doc = " behavior, which may be required for correctness modeling to understand"] + #[doc = " when storage is not expected to be actually reused across threads."] + pub fn __itt_model_record_allocation(addr: *mut ::std::os::raw::c_void, size: usize); +} +extern "C" { + pub fn __itt_model_record_deallocation(addr: *mut ::std::os::raw::c_void); +} +pub type __itt_model_record_allocation_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_record_allocation_ptr__3_0: __itt_model_record_allocation_ptr__3_0_t; +} +pub type __itt_model_record_deallocation_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_record_deallocation_ptr__3_0: + __itt_model_record_deallocation_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief ANNOTATE_INDUCTION_USES support"] + #[doc = ""] + #[doc = " Note particular storage is inductive through the end of the current site"] + pub fn __itt_model_induction_uses(addr: *mut ::std::os::raw::c_void, size: usize); +} +pub type __itt_model_induction_uses_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_induction_uses_ptr__3_0: __itt_model_induction_uses_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief ANNOTATE_REDUCTION_USES support"] + #[doc = ""] + #[doc = " Note particular storage is used for reduction through the end"] + #[doc = " of the current site"] + pub fn __itt_model_reduction_uses(addr: *mut ::std::os::raw::c_void, size: usize); +} +pub type __itt_model_reduction_uses_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_reduction_uses_ptr__3_0: __itt_model_reduction_uses_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief ANNOTATE_OBSERVE_USES support"] + #[doc = ""] + #[doc = " Have correctness modeling record observations about uses of storage"] + #[doc = " through the end of the current site"] + pub fn __itt_model_observe_uses(addr: *mut ::std::os::raw::c_void, size: usize); +} +pub type __itt_model_observe_uses_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_observe_uses_ptr__3_0: __itt_model_observe_uses_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief ANNOTATE_CLEAR_USES support"] + #[doc = ""] + #[doc = " Clear the special handling of a piece of storage related to induction,"] + #[doc = " reduction or observe_uses"] + pub fn __itt_model_clear_uses(addr: *mut ::std::os::raw::c_void); +} +pub type __itt_model_clear_uses_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_clear_uses_ptr__3_0: __itt_model_clear_uses_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief ANNOTATE_DISABLE_*_PUSH/ANNOTATE_DISABLE_*_POP support"] + #[doc = ""] + #[doc = " disable_push/disable_pop push and pop disabling based on a parameter."] + #[doc = " Disabling observations stops processing of memory references during"] + #[doc = " correctness modeling, and all annotations that occur in the disabled"] + #[doc = " region. This allows description of code that is expected to be handled"] + #[doc = " specially during conversion to parallelism or that is not recognized"] + #[doc = " by tools (e.g. some kinds of synchronization operations.)"] + #[doc = " This mechanism causes all annotations in the disabled region, other"] + #[doc = " than disable_push and disable_pop, to be ignored. (For example, this"] + #[doc = " might validly be used to disable an entire parallel site and the contained"] + #[doc = " tasks and locking in it for data collection purposes.)"] + #[doc = " The disable for collection is a more expensive operation, but reduces"] + #[doc = " collector overhead significantly. This applies to BOTH correctness data"] + #[doc = " collection and performance data collection. For example, a site"] + #[doc = " containing a task might only enable data collection for the first 10"] + #[doc = " iterations. Both performance and correctness data should reflect this,"] + #[doc = " and the program should run as close to full speed as possible when"] + #[doc = " collection is disabled."] + pub fn __itt_model_disable_push(x: __itt_model_disable); +} +extern "C" { + pub fn __itt_model_disable_pop(); +} +extern "C" { + pub fn __itt_model_aggregate_task(x: usize); +} +pub type __itt_model_disable_push_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_disable_push_ptr__3_0: __itt_model_disable_push_ptr__3_0_t; +} +pub type __itt_model_disable_pop_ptr__3_0_t = ::std::option::Option; +extern "C" { + pub static mut __itt_model_disable_pop_ptr__3_0: __itt_model_disable_pop_ptr__3_0_t; +} +pub type __itt_model_aggregate_task_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_model_aggregate_task_ptr__3_0: __itt_model_aggregate_task_ptr__3_0_t; +} +#[doc = " @defgroup heap Heap"] +#[doc = " @ingroup public"] +#[doc = " Heap group"] +#[doc = " @{"] +pub type __itt_heap_function = *mut ::std::os::raw::c_void; +extern "C" { + pub fn __itt_heap_function_create( + name: *const ::std::os::raw::c_char, + domain: *const ::std::os::raw::c_char, + ) -> __itt_heap_function; +} +pub type __itt_heap_function_create_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + name: *const ::std::os::raw::c_char, + domain: *const ::std::os::raw::c_char, + ) -> __itt_heap_function, +>; +extern "C" { + pub static mut __itt_heap_function_create_ptr__3_0: __itt_heap_function_create_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Record an allocation begin occurrence."] + pub fn __itt_heap_allocate_begin( + h: __itt_heap_function, + size: usize, + initialized: ::std::os::raw::c_int, + ); +} +pub type __itt_heap_allocate_begin_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(h: __itt_heap_function, size: usize, initialized: ::std::os::raw::c_int), +>; +extern "C" { + pub static mut __itt_heap_allocate_begin_ptr__3_0: __itt_heap_allocate_begin_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Record an allocation end occurrence."] + pub fn __itt_heap_allocate_end( + h: __itt_heap_function, + addr: *mut *mut ::std::os::raw::c_void, + size: usize, + initialized: ::std::os::raw::c_int, + ); +} +pub type __itt_heap_allocate_end_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + h: __itt_heap_function, + addr: *mut *mut ::std::os::raw::c_void, + size: usize, + initialized: ::std::os::raw::c_int, + ), +>; +extern "C" { + pub static mut __itt_heap_allocate_end_ptr__3_0: __itt_heap_allocate_end_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Record an free begin occurrence."] + pub fn __itt_heap_free_begin(h: __itt_heap_function, addr: *mut ::std::os::raw::c_void); +} +pub type __itt_heap_free_begin_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(h: __itt_heap_function, addr: *mut ::std::os::raw::c_void), +>; +extern "C" { + pub static mut __itt_heap_free_begin_ptr__3_0: __itt_heap_free_begin_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Record an free end occurrence."] + pub fn __itt_heap_free_end(h: __itt_heap_function, addr: *mut ::std::os::raw::c_void); +} +pub type __itt_heap_free_end_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(h: __itt_heap_function, addr: *mut ::std::os::raw::c_void), +>; +extern "C" { + pub static mut __itt_heap_free_end_ptr__3_0: __itt_heap_free_end_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Record an reallocation begin occurrence."] + pub fn __itt_heap_reallocate_begin( + h: __itt_heap_function, + addr: *mut ::std::os::raw::c_void, + new_size: usize, + initialized: ::std::os::raw::c_int, + ); +} +pub type __itt_heap_reallocate_begin_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + h: __itt_heap_function, + addr: *mut ::std::os::raw::c_void, + new_size: usize, + initialized: ::std::os::raw::c_int, + ), +>; +extern "C" { + pub static mut __itt_heap_reallocate_begin_ptr__3_0: __itt_heap_reallocate_begin_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Record an reallocation end occurrence."] + pub fn __itt_heap_reallocate_end( + h: __itt_heap_function, + addr: *mut ::std::os::raw::c_void, + new_addr: *mut *mut ::std::os::raw::c_void, + new_size: usize, + initialized: ::std::os::raw::c_int, + ); +} +pub type __itt_heap_reallocate_end_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + h: __itt_heap_function, + addr: *mut ::std::os::raw::c_void, + new_addr: *mut *mut ::std::os::raw::c_void, + new_size: usize, + initialized: ::std::os::raw::c_int, + ), +>; +extern "C" { + pub static mut __itt_heap_reallocate_end_ptr__3_0: __itt_heap_reallocate_end_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief internal access begin"] + pub fn __itt_heap_internal_access_begin(); +} +pub type __itt_heap_internal_access_begin_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_heap_internal_access_begin_ptr__3_0: + __itt_heap_internal_access_begin_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief internal access end"] + pub fn __itt_heap_internal_access_end(); +} +pub type __itt_heap_internal_access_end_ptr__3_0_t = ::std::option::Option; +extern "C" { + pub static mut __itt_heap_internal_access_end_ptr__3_0: + __itt_heap_internal_access_end_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief record memory growth begin"] + pub fn __itt_heap_record_memory_growth_begin(); +} +pub type __itt_heap_record_memory_growth_begin_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_heap_record_memory_growth_begin_ptr__3_0: + __itt_heap_record_memory_growth_begin_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief record memory growth end"] + pub fn __itt_heap_record_memory_growth_end(); +} +pub type __itt_heap_record_memory_growth_end_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_heap_record_memory_growth_end_ptr__3_0: + __itt_heap_record_memory_growth_end_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief heap reset detection"] + pub fn __itt_heap_reset_detection(reset_mask: ::std::os::raw::c_uint); +} +pub type __itt_heap_reset_detection_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_heap_reset_detection_ptr__3_0: __itt_heap_reset_detection_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief report"] + pub fn __itt_heap_record(record_mask: ::std::os::raw::c_uint); +} +pub type __itt_heap_record_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_heap_record_ptr__3_0: __itt_heap_record_ptr__3_0_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ___itt_domain { + #[doc = "< Zero if disabled, non-zero if enabled. The meaning of different non-zero values is reserved to the runtime"] + pub flags: ::std::os::raw::c_int, + #[doc = "< Copy of original name in ASCII."] + pub nameA: *const ::std::os::raw::c_char, + pub nameW: *mut ::std::os::raw::c_void, + #[doc = "< Reserved to the runtime"] + pub extra1: ::std::os::raw::c_int, + #[doc = "< Reserved to the runtime"] + pub extra2: *mut ::std::os::raw::c_void, + pub next: *mut ___itt_domain, +} +#[test] +fn bindgen_test_layout____itt_domain() { + assert_eq!( + ::std::mem::size_of::<___itt_domain>(), + 48usize, + concat!("Size of: ", stringify!(___itt_domain)) + ); + assert_eq!( + ::std::mem::align_of::<___itt_domain>(), + 8usize, + concat!("Alignment of ", stringify!(___itt_domain)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_domain>())).flags as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(___itt_domain), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_domain>())).nameA as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(___itt_domain), + "::", + stringify!(nameA) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_domain>())).nameW as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(___itt_domain), + "::", + stringify!(nameW) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_domain>())).extra1 as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(___itt_domain), + "::", + stringify!(extra1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_domain>())).extra2 as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(___itt_domain), + "::", + stringify!(extra2) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_domain>())).next as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(___itt_domain), + "::", + stringify!(next) + ) + ); +} +pub type __itt_domain = ___itt_domain; +extern "C" { + pub fn __itt_domain_create(name: *const ::std::os::raw::c_char) -> *mut __itt_domain; +} +pub type __itt_domain_create_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(name: *const ::std::os::raw::c_char) -> *mut __itt_domain, +>; +extern "C" { + pub static mut __itt_domain_create_ptr__3_0: __itt_domain_create_ptr__3_0_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ___itt_id { + pub d1: ::std::os::raw::c_ulonglong, + pub d2: ::std::os::raw::c_ulonglong, + pub d3: ::std::os::raw::c_ulonglong, +} +#[test] +fn bindgen_test_layout____itt_id() { + assert_eq!( + ::std::mem::size_of::<___itt_id>(), + 24usize, + concat!("Size of: ", stringify!(___itt_id)) + ); + assert_eq!( + ::std::mem::align_of::<___itt_id>(), + 8usize, + concat!("Alignment of ", stringify!(___itt_id)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_id>())).d1 as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(___itt_id), + "::", + stringify!(d1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_id>())).d2 as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(___itt_id), + "::", + stringify!(d2) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_id>())).d3 as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(___itt_id), + "::", + stringify!(d3) + ) + ); +} +pub type __itt_id = ___itt_id; +extern "C" { + pub static __itt_null: __itt_id; +} +extern "C" { + #[doc = " @ingroup ids"] + #[doc = " @brief Create an instance of identifier."] + #[doc = " This establishes the beginning of the lifetime of an instance of"] + #[doc = " the given ID in the trace. Once this lifetime starts, the ID"] + #[doc = " can be used to tag named entity instances in calls such as"] + #[doc = " __itt_task_begin, and to specify relationships among"] + #[doc = " identified named entity instances, using the \\ref relations APIs."] + #[doc = " Instance IDs are not domain specific!"] + #[doc = " @param[in] domain The domain controlling the execution of this call."] + #[doc = " @param[in] id The ID to create."] + pub fn __itt_id_create(domain: *const __itt_domain, id: __itt_id); +} +pub type __itt_id_create_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_id_create_ptr__3_0: __itt_id_create_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup ids"] + #[doc = " @brief Destroy an instance of identifier."] + #[doc = " This ends the lifetime of the current instance of the given ID value in the trace."] + #[doc = " Any relationships that are established after this lifetime ends are invalid."] + #[doc = " This call must be performed before the given ID value can be reused for a different"] + #[doc = " named entity instance."] + #[doc = " @param[in] domain The domain controlling the execution of this call."] + #[doc = " @param[in] id The ID to destroy."] + pub fn __itt_id_destroy(domain: *const __itt_domain, id: __itt_id); +} +pub type __itt_id_destroy_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_id_destroy_ptr__3_0: __itt_id_destroy_ptr__3_0_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ___itt_string_handle { + #[doc = "< Copy of original string in ASCII."] + pub strA: *const ::std::os::raw::c_char, + pub strW: *mut ::std::os::raw::c_void, + #[doc = "< Reserved. Must be zero"] + pub extra1: ::std::os::raw::c_int, + #[doc = "< Reserved. Must be zero"] + pub extra2: *mut ::std::os::raw::c_void, + pub next: *mut ___itt_string_handle, +} +#[test] +fn bindgen_test_layout____itt_string_handle() { + assert_eq!( + ::std::mem::size_of::<___itt_string_handle>(), + 40usize, + concat!("Size of: ", stringify!(___itt_string_handle)) + ); + assert_eq!( + ::std::mem::align_of::<___itt_string_handle>(), + 8usize, + concat!("Alignment of ", stringify!(___itt_string_handle)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).strA as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(___itt_string_handle), + "::", + stringify!(strA) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).strW as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(___itt_string_handle), + "::", + stringify!(strW) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).extra1 as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(___itt_string_handle), + "::", + stringify!(extra1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).extra2 as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(___itt_string_handle), + "::", + stringify!(extra2) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_string_handle>())).next as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(___itt_string_handle), + "::", + stringify!(next) + ) + ); +} +pub type __itt_string_handle = ___itt_string_handle; +extern "C" { + pub fn __itt_string_handle_create( + name: *const ::std::os::raw::c_char, + ) -> *mut __itt_string_handle; +} +pub type __itt_string_handle_create_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(name: *const ::std::os::raw::c_char) -> *mut __itt_string_handle, +>; +extern "C" { + pub static mut __itt_string_handle_create_ptr__3_0: __itt_string_handle_create_ptr__3_0_t; +} +#[doc = " @cond exclude_from_documentation"] +pub type __itt_timestamp = ::std::os::raw::c_ulonglong; +extern "C" { + #[doc = " @ingroup timestamps"] + #[doc = " @brief Return timestamp corresponding to the current moment."] + #[doc = " This returns the timestamp in the format that is the most relevant for the current"] + #[doc = " host or platform (RDTSC, QPC, and others). You can use the \"<\" operator to"] + #[doc = " compare __itt_timestamp values."] + pub fn __itt_get_timestamp() -> __itt_timestamp; +} +pub type __itt_get_timestamp_ptr__3_0_t = + ::std::option::Option __itt_timestamp>; +extern "C" { + pub static mut __itt_get_timestamp_ptr__3_0: __itt_get_timestamp_ptr__3_0_t; +} +extern "C" { + #[doc = " @defgroup regions Regions"] + #[doc = " @ingroup public"] + #[doc = " Regions group"] + #[doc = " @{"] + #[doc = " @ingroup regions"] + #[doc = " @brief Begin of region instance."] + #[doc = " Successive calls to __itt_region_begin with the same ID are ignored"] + #[doc = " until a call to __itt_region_end with the same ID"] + #[doc = " @param[in] domain The domain for this region instance"] + #[doc = " @param[in] id The instance ID for this region instance. Must not be __itt_null"] + #[doc = " @param[in] parentid The instance ID for the parent of this region instance, or __itt_null"] + #[doc = " @param[in] name The name of this region"] + pub fn __itt_region_begin( + domain: *const __itt_domain, + id: __itt_id, + parentid: __itt_id, + name: *mut __itt_string_handle, + ); +} +extern "C" { + #[doc = " @ingroup regions"] + #[doc = " @brief End of region instance."] + #[doc = " The first call to __itt_region_end with a given ID ends the"] + #[doc = " region. Successive calls with the same ID are ignored, as are"] + #[doc = " calls that do not have a matching __itt_region_begin call."] + #[doc = " @param[in] domain The domain for this region instance"] + #[doc = " @param[in] id The instance ID for this region instance"] + pub fn __itt_region_end(domain: *const __itt_domain, id: __itt_id); +} +pub type __itt_region_begin_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + id: __itt_id, + parentid: __itt_id, + name: *mut __itt_string_handle, + ), +>; +extern "C" { + pub static mut __itt_region_begin_ptr__3_0: __itt_region_begin_ptr__3_0_t; +} +pub type __itt_region_end_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_region_end_ptr__3_0: __itt_region_end_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup frames"] + #[doc = " @brief Begin a frame instance."] + #[doc = " Successive calls to __itt_frame_begin with the"] + #[doc = " same ID are ignored until a call to __itt_frame_end with the same ID."] + #[doc = " @param[in] domain The domain for this frame instance"] + #[doc = " @param[in] id The instance ID for this frame instance or NULL"] + pub fn __itt_frame_begin_v3(domain: *const __itt_domain, id: *mut __itt_id); +} +extern "C" { + #[doc = " @ingroup frames"] + #[doc = " @brief End a frame instance."] + #[doc = " The first call to __itt_frame_end with a given ID"] + #[doc = " ends the frame. Successive calls with the same ID are ignored, as are"] + #[doc = " calls that do not have a matching __itt_frame_begin call."] + #[doc = " @param[in] domain The domain for this frame instance"] + #[doc = " @param[in] id The instance ID for this frame instance or NULL for current"] + pub fn __itt_frame_end_v3(domain: *const __itt_domain, id: *mut __itt_id); +} +extern "C" { + #[doc = " @ingroup frames"] + #[doc = " @brief Submits a frame instance."] + #[doc = " Successive calls to __itt_frame_begin or __itt_frame_submit with the"] + #[doc = " same ID are ignored until a call to __itt_frame_end or __itt_frame_submit"] + #[doc = " with the same ID."] + #[doc = " Passing special __itt_timestamp_none value as \"end\" argument means"] + #[doc = " take the current timestamp as the end timestamp."] + #[doc = " @param[in] domain The domain for this frame instance"] + #[doc = " @param[in] id The instance ID for this frame instance or NULL"] + #[doc = " @param[in] begin Timestamp of the beginning of the frame"] + #[doc = " @param[in] end Timestamp of the end of the frame"] + pub fn __itt_frame_submit_v3( + domain: *const __itt_domain, + id: *mut __itt_id, + begin: __itt_timestamp, + end: __itt_timestamp, + ); +} +pub type __itt_frame_begin_v3_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_frame_begin_v3_ptr__3_0: __itt_frame_begin_v3_ptr__3_0_t; +} +pub type __itt_frame_end_v3_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_frame_end_v3_ptr__3_0: __itt_frame_end_v3_ptr__3_0_t; +} +pub type __itt_frame_submit_v3_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + id: *mut __itt_id, + begin: __itt_timestamp, + end: __itt_timestamp, + ), +>; +extern "C" { + pub static mut __itt_frame_submit_v3_ptr__3_0: __itt_frame_submit_v3_ptr__3_0_t; +} +extern "C" { + #[doc = " @defgroup taskgroup Task Group"] + #[doc = " @ingroup public"] + #[doc = " Task Group"] + #[doc = " @{"] + #[doc = " @ingroup task_groups"] + #[doc = " @brief Denotes a task_group instance."] + #[doc = " Successive calls to __itt_task_group with the same ID are ignored."] + #[doc = " @param[in] domain The domain for this task_group instance"] + #[doc = " @param[in] id The instance ID for this task_group instance. Must not be __itt_null."] + #[doc = " @param[in] parentid The instance ID for the parent of this task_group instance, or __itt_null."] + #[doc = " @param[in] name The name of this task_group"] + pub fn __itt_task_group( + domain: *const __itt_domain, + id: __itt_id, + parentid: __itt_id, + name: *mut __itt_string_handle, + ); +} +pub type __itt_task_group_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + id: __itt_id, + parentid: __itt_id, + name: *mut __itt_string_handle, + ), +>; +extern "C" { + pub static mut __itt_task_group_ptr__3_0: __itt_task_group_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup tasks"] + #[doc = " @brief Begin a task instance."] + #[doc = " @param[in] domain The domain for this task"] + #[doc = " @param[in] taskid The instance ID for this task instance, or __itt_null"] + #[doc = " @param[in] parentid The parent instance to which this task instance belongs, or __itt_null"] + #[doc = " @param[in] name The name of this task"] + pub fn __itt_task_begin( + domain: *const __itt_domain, + taskid: __itt_id, + parentid: __itt_id, + name: *mut __itt_string_handle, + ); +} +extern "C" { + #[doc = " @ingroup tasks"] + #[doc = " @brief Begin a task instance."] + #[doc = " @param[in] domain The domain for this task"] + #[doc = " @param[in] taskid The identifier for this task instance (may be 0)"] + #[doc = " @param[in] parentid The parent of this task (may be 0)"] + #[doc = " @param[in] fn The pointer to the function you are tracing"] + pub fn __itt_task_begin_fn( + domain: *const __itt_domain, + taskid: __itt_id, + parentid: __itt_id, + fn_: *mut ::std::os::raw::c_void, + ); +} +extern "C" { + #[doc = " @ingroup tasks"] + #[doc = " @brief End the current task instance."] + #[doc = " @param[in] domain The domain for this task"] + pub fn __itt_task_end(domain: *const __itt_domain); +} +extern "C" { + #[doc = " @ingroup tasks"] + #[doc = " @brief Begin an overlapped task instance."] + #[doc = " @param[in] domain The domain for this task."] + #[doc = " @param[in] taskid The identifier for this task instance, *cannot* be __itt_null."] + #[doc = " @param[in] parentid The parent of this task, or __itt_null."] + #[doc = " @param[in] name The name of this task."] + pub fn __itt_task_begin_overlapped( + domain: *const __itt_domain, + taskid: __itt_id, + parentid: __itt_id, + name: *mut __itt_string_handle, + ); +} +extern "C" { + #[doc = " @ingroup tasks"] + #[doc = " @brief End an overlapped task instance."] + #[doc = " @param[in] domain The domain for this task"] + #[doc = " @param[in] taskid Explicit ID of finished task"] + pub fn __itt_task_end_overlapped(domain: *const __itt_domain, taskid: __itt_id); +} +pub type __itt_task_begin_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + id: __itt_id, + parentid: __itt_id, + name: *mut __itt_string_handle, + ), +>; +extern "C" { + pub static mut __itt_task_begin_ptr__3_0: __itt_task_begin_ptr__3_0_t; +} +pub type __itt_task_begin_fn_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + id: __itt_id, + parentid: __itt_id, + fn_: *mut ::std::os::raw::c_void, + ), +>; +extern "C" { + pub static mut __itt_task_begin_fn_ptr__3_0: __itt_task_begin_fn_ptr__3_0_t; +} +pub type __itt_task_end_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_task_end_ptr__3_0: __itt_task_end_ptr__3_0_t; +} +pub type __itt_task_begin_overlapped_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + taskid: __itt_id, + parentid: __itt_id, + name: *mut __itt_string_handle, + ), +>; +extern "C" { + pub static mut __itt_task_begin_overlapped_ptr__3_0: __itt_task_begin_overlapped_ptr__3_0_t; +} +pub type __itt_task_end_overlapped_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_task_end_overlapped_ptr__3_0: __itt_task_end_overlapped_ptr__3_0_t; +} +pub const __itt_scope___itt_scope_unknown: __itt_scope = 0; +pub const __itt_scope___itt_scope_global: __itt_scope = 1; +pub const __itt_scope___itt_scope_track_group: __itt_scope = 2; +pub const __itt_scope___itt_scope_track: __itt_scope = 3; +pub const __itt_scope___itt_scope_task: __itt_scope = 4; +pub const __itt_scope___itt_scope_marker: __itt_scope = 5; +#[doc = " @brief Describes the scope of an event object in the trace."] +pub type __itt_scope = u32; +extern "C" { + #[doc = " @ingroup markers"] + #[doc = " @brief Create a marker instance"] + #[doc = " @param[in] domain The domain for this marker"] + #[doc = " @param[in] id The instance ID for this marker or __itt_null"] + #[doc = " @param[in] name The name for this marker"] + #[doc = " @param[in] scope The scope for this marker"] + pub fn __itt_marker( + domain: *const __itt_domain, + id: __itt_id, + name: *mut __itt_string_handle, + scope: __itt_scope, + ); +} +pub type __itt_marker_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + id: __itt_id, + name: *mut __itt_string_handle, + scope: __itt_scope, + ), +>; +extern "C" { + pub static mut __itt_marker_ptr__3_0: __itt_marker_ptr__3_0_t; +} +pub const __itt_metadata_type___itt_metadata_unknown: __itt_metadata_type = 0; +#[doc = "< Unsigned 64-bit integer"] +pub const __itt_metadata_type___itt_metadata_u64: __itt_metadata_type = 1; +#[doc = "< Signed 64-bit integer"] +pub const __itt_metadata_type___itt_metadata_s64: __itt_metadata_type = 2; +#[doc = "< Unsigned 32-bit integer"] +pub const __itt_metadata_type___itt_metadata_u32: __itt_metadata_type = 3; +#[doc = "< Signed 32-bit integer"] +pub const __itt_metadata_type___itt_metadata_s32: __itt_metadata_type = 4; +#[doc = "< Unsigned 16-bit integer"] +pub const __itt_metadata_type___itt_metadata_u16: __itt_metadata_type = 5; +#[doc = "< Signed 16-bit integer"] +pub const __itt_metadata_type___itt_metadata_s16: __itt_metadata_type = 6; +#[doc = "< Signed 32-bit floating-point"] +pub const __itt_metadata_type___itt_metadata_float: __itt_metadata_type = 7; +#[doc = "< SIgned 64-bit floating-point"] +pub const __itt_metadata_type___itt_metadata_double: __itt_metadata_type = 8; +#[doc = " @ingroup parameters"] +#[doc = " @brief describes the type of metadata"] +pub type __itt_metadata_type = u32; +extern "C" { + #[doc = " @ingroup parameters"] + #[doc = " @brief Add metadata to an instance of a named entity."] + #[doc = " @param[in] domain The domain controlling the call"] + #[doc = " @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task"] + #[doc = " @param[in] key The name of the metadata"] + #[doc = " @param[in] type The type of the metadata"] + #[doc = " @param[in] count The number of elements of the given type. If count == 0, no metadata will be added."] + #[doc = " @param[in] data The metadata itself"] + pub fn __itt_metadata_add( + domain: *const __itt_domain, + id: __itt_id, + key: *mut __itt_string_handle, + type_: __itt_metadata_type, + count: usize, + data: *mut ::std::os::raw::c_void, + ); +} +pub type __itt_metadata_add_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + id: __itt_id, + key: *mut __itt_string_handle, + type_: __itt_metadata_type, + count: usize, + data: *mut ::std::os::raw::c_void, + ), +>; +extern "C" { + pub static mut __itt_metadata_add_ptr__3_0: __itt_metadata_add_ptr__3_0_t; +} +extern "C" { + pub fn __itt_metadata_str_add( + domain: *const __itt_domain, + id: __itt_id, + key: *mut __itt_string_handle, + data: *const ::std::os::raw::c_char, + length: usize, + ); +} +pub type __itt_metadata_str_add_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + id: __itt_id, + key: *mut __itt_string_handle, + data: *const ::std::os::raw::c_char, + length: usize, + ), +>; +extern "C" { + pub static mut __itt_metadata_str_add_ptr__3_0: __itt_metadata_str_add_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup parameters"] + #[doc = " @brief Add metadata to an instance of a named entity."] + #[doc = " @param[in] domain The domain controlling the call"] + #[doc = " @param[in] scope The scope of the instance to which the metadata is to be added"] + #[doc = ""] + #[doc = " @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task"] + #[doc = ""] + #[doc = " @param[in] key The name of the metadata"] + #[doc = " @param[in] type The type of the metadata"] + #[doc = " @param[in] count The number of elements of the given type. If count == 0, no metadata will be added."] + #[doc = " @param[in] data The metadata itself"] + pub fn __itt_metadata_add_with_scope( + domain: *const __itt_domain, + scope: __itt_scope, + key: *mut __itt_string_handle, + type_: __itt_metadata_type, + count: usize, + data: *mut ::std::os::raw::c_void, + ); +} +pub type __itt_metadata_add_with_scope_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + scope: __itt_scope, + key: *mut __itt_string_handle, + type_: __itt_metadata_type, + count: usize, + data: *mut ::std::os::raw::c_void, + ), +>; +extern "C" { + pub static mut __itt_metadata_add_with_scope_ptr__3_0: __itt_metadata_add_with_scope_ptr__3_0_t; +} +extern "C" { + pub fn __itt_metadata_str_add_with_scope( + domain: *const __itt_domain, + scope: __itt_scope, + key: *mut __itt_string_handle, + data: *const ::std::os::raw::c_char, + length: usize, + ); +} +pub type __itt_metadata_str_add_with_scope_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + scope: __itt_scope, + key: *mut __itt_string_handle, + data: *const ::std::os::raw::c_char, + length: usize, + ), +>; +extern "C" { + pub static mut __itt_metadata_str_add_with_scope_ptr__3_0: + __itt_metadata_str_add_with_scope_ptr__3_0_t; +} +pub const __itt_relation___itt_relation_is_unknown: __itt_relation = 0; +#[doc = "< \"A is dependent on B\" means that A cannot start until B completes"] +pub const __itt_relation___itt_relation_is_dependent_on: __itt_relation = 1; +#[doc = "< \"A is sibling of B\" means that A and B were created as a group"] +pub const __itt_relation___itt_relation_is_sibling_of: __itt_relation = 2; +#[doc = "< \"A is parent of B\" means that A created B"] +pub const __itt_relation___itt_relation_is_parent_of: __itt_relation = 3; +#[doc = "< \"A is continuation of B\" means that A assumes the dependencies of B"] +pub const __itt_relation___itt_relation_is_continuation_of: __itt_relation = 4; +#[doc = "< \"A is child of B\" means that A was created by B (inverse of is_parent_of)"] +pub const __itt_relation___itt_relation_is_child_of: __itt_relation = 5; +#[doc = "< \"A is continued by B\" means that B assumes the dependencies of A (inverse of is_continuation_of)"] +pub const __itt_relation___itt_relation_is_continued_by: __itt_relation = 6; +#[doc = "< \"A is predecessor to B\" means that B cannot start until A completes (inverse of is_dependent_on)"] +pub const __itt_relation___itt_relation_is_predecessor_to: __itt_relation = 7; +#[doc = " @ingroup relations"] +#[doc = " @brief The kind of relation between two instances is specified by the enumerated type __itt_relation."] +#[doc = " Relations between instances can be added with an API call. The relation"] +#[doc = " API uses instance IDs. Relations can be added before or after the actual"] +#[doc = " instances are created and persist independently of the instances. This"] +#[doc = " is the motivation for having different lifetimes for instance IDs and"] +#[doc = " the actual instances."] +pub type __itt_relation = u32; +extern "C" { + #[doc = " @ingroup relations"] + #[doc = " @brief Add a relation to the current task instance."] + #[doc = " The current task instance is the head of the relation."] + #[doc = " @param[in] domain The domain controlling this call"] + #[doc = " @param[in] relation The kind of relation"] + #[doc = " @param[in] tail The ID for the tail of the relation"] + pub fn __itt_relation_add_to_current( + domain: *const __itt_domain, + relation: __itt_relation, + tail: __itt_id, + ); +} +extern "C" { + #[doc = " @ingroup relations"] + #[doc = " @brief Add a relation between two instance identifiers."] + #[doc = " @param[in] domain The domain controlling this call"] + #[doc = " @param[in] head The ID for the head of the relation"] + #[doc = " @param[in] relation The kind of relation"] + #[doc = " @param[in] tail The ID for the tail of the relation"] + pub fn __itt_relation_add( + domain: *const __itt_domain, + head: __itt_id, + relation: __itt_relation, + tail: __itt_id, + ); +} +pub type __itt_relation_add_to_current_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(domain: *const __itt_domain, relation: __itt_relation, tail: __itt_id), +>; +extern "C" { + pub static mut __itt_relation_add_to_current_ptr__3_0: __itt_relation_add_to_current_ptr__3_0_t; +} +pub type __itt_relation_add_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + head: __itt_id, + relation: __itt_relation, + tail: __itt_id, + ), +>; +extern "C" { + pub static mut __itt_relation_add_ptr__3_0: __itt_relation_add_ptr__3_0_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ___itt_clock_info { + #[doc = "< Clock domain frequency"] + pub clock_freq: ::std::os::raw::c_ulonglong, + #[doc = "< Clock domain base timestamp"] + pub clock_base: ::std::os::raw::c_ulonglong, +} +#[test] +fn bindgen_test_layout____itt_clock_info() { + assert_eq!( + ::std::mem::size_of::<___itt_clock_info>(), + 16usize, + concat!("Size of: ", stringify!(___itt_clock_info)) + ); + assert_eq!( + ::std::mem::align_of::<___itt_clock_info>(), + 8usize, + concat!("Alignment of ", stringify!(___itt_clock_info)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_clock_info>())).clock_freq as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(___itt_clock_info), + "::", + stringify!(clock_freq) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_clock_info>())).clock_base as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(___itt_clock_info), + "::", + stringify!(clock_base) + ) + ); +} +pub type __itt_clock_info = ___itt_clock_info; +#[doc = " @cond exclude_from_documentation"] +pub type __itt_get_clock_info_fn = ::std::option::Option< + unsafe extern "C" fn(clock_info: *mut __itt_clock_info, data: *mut ::std::os::raw::c_void), +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ___itt_clock_domain { + #[doc = "< Most recent clock domain info"] + pub info: __itt_clock_info, + #[doc = "< Callback function pointer"] + pub fn_: __itt_get_clock_info_fn, + #[doc = "< Input argument for the callback function"] + pub fn_data: *mut ::std::os::raw::c_void, + #[doc = "< Reserved. Must be zero"] + pub extra1: ::std::os::raw::c_int, + #[doc = "< Reserved. Must be zero"] + pub extra2: *mut ::std::os::raw::c_void, + pub next: *mut ___itt_clock_domain, +} +#[test] +fn bindgen_test_layout____itt_clock_domain() { + assert_eq!( + ::std::mem::size_of::<___itt_clock_domain>(), + 56usize, + concat!("Size of: ", stringify!(___itt_clock_domain)) + ); + assert_eq!( + ::std::mem::align_of::<___itt_clock_domain>(), + 8usize, + concat!("Alignment of ", stringify!(___itt_clock_domain)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).info as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(___itt_clock_domain), + "::", + stringify!(info) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).fn_ as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(___itt_clock_domain), + "::", + stringify!(fn_) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).fn_data as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(___itt_clock_domain), + "::", + stringify!(fn_data) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).extra1 as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(___itt_clock_domain), + "::", + stringify!(extra1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).extra2 as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(___itt_clock_domain), + "::", + stringify!(extra2) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_clock_domain>())).next as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(___itt_clock_domain), + "::", + stringify!(next) + ) + ); +} +pub type __itt_clock_domain = ___itt_clock_domain; +extern "C" { + #[doc = " @ingroup clockdomains"] + #[doc = " @brief Create a clock domain."] + #[doc = " Certain applications require the capability to trace their application using"] + #[doc = " a clock domain different than the CPU, for instance the instrumentation of events"] + #[doc = " that occur on a GPU."] + #[doc = " Because the set of domains is expected to be static over the application's execution time,"] + #[doc = " there is no mechanism to destroy a domain."] + #[doc = " Any domain can be accessed by any thread in the process, regardless of which thread created"] + #[doc = " the domain. This call is thread-safe."] + #[doc = " @param[in] fn A pointer to a callback function which retrieves alternative CPU timestamps"] + #[doc = " @param[in] fn_data Argument for a callback function; may be NULL"] + pub fn __itt_clock_domain_create( + fn_: __itt_get_clock_info_fn, + fn_data: *mut ::std::os::raw::c_void, + ) -> *mut __itt_clock_domain; +} +pub type __itt_clock_domain_create_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + fn_: __itt_get_clock_info_fn, + fn_data: *mut ::std::os::raw::c_void, + ) -> *mut __itt_clock_domain, +>; +extern "C" { + pub static mut __itt_clock_domain_create_ptr__3_0: __itt_clock_domain_create_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup clockdomains"] + #[doc = " @brief Recalculate clock domains frequencies and clock base timestamps."] + pub fn __itt_clock_domain_reset(); +} +pub type __itt_clock_domain_reset_ptr__3_0_t = ::std::option::Option; +extern "C" { + pub static mut __itt_clock_domain_reset_ptr__3_0: __itt_clock_domain_reset_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup clockdomain"] + #[doc = " @brief Create an instance of identifier. This establishes the beginning of the lifetime of"] + #[doc = " an instance of the given ID in the trace. Once this lifetime starts, the ID can be used to"] + #[doc = " tag named entity instances in calls such as __itt_task_begin, and to specify relationships among"] + #[doc = " identified named entity instances, using the \\ref relations APIs."] + #[doc = " @param[in] domain The domain controlling the execution of this call."] + #[doc = " @param[in] clock_domain The clock domain controlling the execution of this call."] + #[doc = " @param[in] timestamp The user defined timestamp."] + #[doc = " @param[in] id The ID to create."] + pub fn __itt_id_create_ex( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + id: __itt_id, + ); +} +extern "C" { + #[doc = " @ingroup clockdomain"] + #[doc = " @brief Destroy an instance of identifier. This ends the lifetime of the current instance of the"] + #[doc = " given ID value in the trace. Any relationships that are established after this lifetime ends are"] + #[doc = " invalid. This call must be performed before the given ID value can be reused for a different"] + #[doc = " named entity instance."] + #[doc = " @param[in] domain The domain controlling the execution of this call."] + #[doc = " @param[in] clock_domain The clock domain controlling the execution of this call."] + #[doc = " @param[in] timestamp The user defined timestamp."] + #[doc = " @param[in] id The ID to destroy."] + pub fn __itt_id_destroy_ex( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + id: __itt_id, + ); +} +pub type __itt_id_create_ex_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + id: __itt_id, + ), +>; +extern "C" { + pub static mut __itt_id_create_ex_ptr__3_0: __itt_id_create_ex_ptr__3_0_t; +} +pub type __itt_id_destroy_ex_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + id: __itt_id, + ), +>; +extern "C" { + pub static mut __itt_id_destroy_ex_ptr__3_0: __itt_id_destroy_ex_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup clockdomain"] + #[doc = " @brief Begin a task instance."] + #[doc = " @param[in] domain The domain for this task"] + #[doc = " @param[in] clock_domain The clock domain controlling the execution of this call."] + #[doc = " @param[in] timestamp The user defined timestamp."] + #[doc = " @param[in] taskid The instance ID for this task instance, or __itt_null"] + #[doc = " @param[in] parentid The parent instance to which this task instance belongs, or __itt_null"] + #[doc = " @param[in] name The name of this task"] + pub fn __itt_task_begin_ex( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + taskid: __itt_id, + parentid: __itt_id, + name: *mut __itt_string_handle, + ); +} +extern "C" { + #[doc = " @ingroup clockdomain"] + #[doc = " @brief Begin a task instance."] + #[doc = " @param[in] domain The domain for this task"] + #[doc = " @param[in] clock_domain The clock domain controlling the execution of this call."] + #[doc = " @param[in] timestamp The user defined timestamp."] + #[doc = " @param[in] taskid The identifier for this task instance, or __itt_null"] + #[doc = " @param[in] parentid The parent of this task, or __itt_null"] + #[doc = " @param[in] fn The pointer to the function you are tracing"] + pub fn __itt_task_begin_fn_ex( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + taskid: __itt_id, + parentid: __itt_id, + fn_: *mut ::std::os::raw::c_void, + ); +} +extern "C" { + #[doc = " @ingroup clockdomain"] + #[doc = " @brief End the current task instance."] + #[doc = " @param[in] domain The domain for this task"] + #[doc = " @param[in] clock_domain The clock domain controlling the execution of this call."] + #[doc = " @param[in] timestamp The user defined timestamp."] + pub fn __itt_task_end_ex( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + ); +} +pub type __itt_task_begin_ex_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + id: __itt_id, + parentid: __itt_id, + name: *mut __itt_string_handle, + ), +>; +extern "C" { + pub static mut __itt_task_begin_ex_ptr__3_0: __itt_task_begin_ex_ptr__3_0_t; +} +pub type __itt_task_begin_fn_ex_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + id: __itt_id, + parentid: __itt_id, + fn_: *mut ::std::os::raw::c_void, + ), +>; +extern "C" { + pub static mut __itt_task_begin_fn_ex_ptr__3_0: __itt_task_begin_fn_ex_ptr__3_0_t; +} +pub type __itt_task_end_ex_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + ), +>; +extern "C" { + pub static mut __itt_task_end_ex_ptr__3_0: __itt_task_end_ex_ptr__3_0_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ___itt_counter { + _unused: [u8; 0], +} +#[doc = " @brief opaque structure for counter identification"] +pub type __itt_counter = *mut ___itt_counter; +extern "C" { + pub fn __itt_counter_create( + name: *const ::std::os::raw::c_char, + domain: *const ::std::os::raw::c_char, + ) -> __itt_counter; +} +pub type __itt_counter_create_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + name: *const ::std::os::raw::c_char, + domain: *const ::std::os::raw::c_char, + ) -> __itt_counter, +>; +extern "C" { + pub static mut __itt_counter_create_ptr__3_0: __itt_counter_create_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Increment the unsigned 64 bits integer counter value"] + #[doc = ""] + #[doc = " Calling this function to non-unsigned 64 bits integer counters has no effect"] + pub fn __itt_counter_inc(id: __itt_counter); +} +pub type __itt_counter_inc_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_counter_inc_ptr__3_0: __itt_counter_inc_ptr__3_0_t; +} +extern "C" { + #[doc = " @endcond */"] + #[doc = " @brief Increment the unsigned 64 bits integer counter value with x"] + #[doc = ""] + #[doc = " Calling this function to non-unsigned 64 bits integer counters has no effect"] + pub fn __itt_counter_inc_delta(id: __itt_counter, value: ::std::os::raw::c_ulonglong); +} +pub type __itt_counter_inc_delta_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(id: __itt_counter, value: ::std::os::raw::c_ulonglong), +>; +extern "C" { + pub static mut __itt_counter_inc_delta_ptr__3_0: __itt_counter_inc_delta_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Decrement the unsigned 64 bits integer counter value"] + #[doc = ""] + #[doc = " Calling this function to non-unsigned 64 bits integer counters has no effect"] + pub fn __itt_counter_dec(id: __itt_counter); +} +pub type __itt_counter_dec_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_counter_dec_ptr__3_0: __itt_counter_dec_ptr__3_0_t; +} +extern "C" { + #[doc = " @endcond */"] + #[doc = " @brief Decrement the unsigned 64 bits integer counter value with x"] + #[doc = ""] + #[doc = " Calling this function to non-unsigned 64 bits integer counters has no effect"] + pub fn __itt_counter_dec_delta(id: __itt_counter, value: ::std::os::raw::c_ulonglong); +} +pub type __itt_counter_dec_delta_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(id: __itt_counter, value: ::std::os::raw::c_ulonglong), +>; +extern "C" { + pub static mut __itt_counter_dec_delta_ptr__3_0: __itt_counter_dec_delta_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup counters"] + #[doc = " @brief Increment a counter by one."] + #[doc = " The first call with a given name creates a counter by that name and sets its"] + #[doc = " value to zero. Successive calls increment the counter value."] + #[doc = " @param[in] domain The domain controlling the call. Counter names are not domain specific."] + #[doc = " The domain argument is used only to enable or disable the API calls."] + #[doc = " @param[in] name The name of the counter"] + pub fn __itt_counter_inc_v3(domain: *const __itt_domain, name: *mut __itt_string_handle); +} +extern "C" { + #[doc = " @ingroup counters"] + #[doc = " @brief Increment a counter by the value specified in delta."] + #[doc = " @param[in] domain The domain controlling the call. Counter names are not domain specific."] + #[doc = " The domain argument is used only to enable or disable the API calls."] + #[doc = " @param[in] name The name of the counter"] + #[doc = " @param[in] delta The amount by which to increment the counter"] + pub fn __itt_counter_inc_delta_v3( + domain: *const __itt_domain, + name: *mut __itt_string_handle, + delta: ::std::os::raw::c_ulonglong, + ); +} +pub type __itt_counter_inc_v3_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(domain: *const __itt_domain, name: *mut __itt_string_handle), +>; +extern "C" { + pub static mut __itt_counter_inc_v3_ptr__3_0: __itt_counter_inc_v3_ptr__3_0_t; +} +pub type __itt_counter_inc_delta_v3_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + name: *mut __itt_string_handle, + delta: ::std::os::raw::c_ulonglong, + ), +>; +extern "C" { + pub static mut __itt_counter_inc_delta_v3_ptr__3_0: __itt_counter_inc_delta_v3_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup counters"] + #[doc = " @brief Decrement a counter by one."] + #[doc = " The first call with a given name creates a counter by that name and sets its"] + #[doc = " value to zero. Successive calls decrement the counter value."] + #[doc = " @param[in] domain The domain controlling the call. Counter names are not domain specific."] + #[doc = " The domain argument is used only to enable or disable the API calls."] + #[doc = " @param[in] name The name of the counter"] + pub fn __itt_counter_dec_v3(domain: *const __itt_domain, name: *mut __itt_string_handle); +} +extern "C" { + #[doc = " @ingroup counters"] + #[doc = " @brief Decrement a counter by the value specified in delta."] + #[doc = " @param[in] domain The domain controlling the call. Counter names are not domain specific."] + #[doc = " The domain argument is used only to enable or disable the API calls."] + #[doc = " @param[in] name The name of the counter"] + #[doc = " @param[in] delta The amount by which to decrement the counter"] + pub fn __itt_counter_dec_delta_v3( + domain: *const __itt_domain, + name: *mut __itt_string_handle, + delta: ::std::os::raw::c_ulonglong, + ); +} +pub type __itt_counter_dec_v3_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(domain: *const __itt_domain, name: *mut __itt_string_handle), +>; +extern "C" { + pub static mut __itt_counter_dec_v3_ptr__3_0: __itt_counter_dec_v3_ptr__3_0_t; +} +pub type __itt_counter_dec_delta_v3_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + name: *mut __itt_string_handle, + delta: ::std::os::raw::c_ulonglong, + ), +>; +extern "C" { + pub static mut __itt_counter_dec_delta_v3_ptr__3_0: __itt_counter_dec_delta_v3_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Set the counter value"] + pub fn __itt_counter_set_value(id: __itt_counter, value_ptr: *mut ::std::os::raw::c_void); +} +pub type __itt_counter_set_value_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn(id: __itt_counter, value_ptr: *mut ::std::os::raw::c_void), +>; +extern "C" { + pub static mut __itt_counter_set_value_ptr__3_0: __itt_counter_set_value_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Set the counter value"] + pub fn __itt_counter_set_value_ex( + id: __itt_counter, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + value_ptr: *mut ::std::os::raw::c_void, + ); +} +pub type __itt_counter_set_value_ex_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + id: __itt_counter, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + value_ptr: *mut ::std::os::raw::c_void, + ), +>; +extern "C" { + pub static mut __itt_counter_set_value_ex_ptr__3_0: __itt_counter_set_value_ex_ptr__3_0_t; +} +extern "C" { + pub fn __itt_counter_create_typed( + name: *const ::std::os::raw::c_char, + domain: *const ::std::os::raw::c_char, + type_: __itt_metadata_type, + ) -> __itt_counter; +} +pub type __itt_counter_create_typed_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + name: *const ::std::os::raw::c_char, + domain: *const ::std::os::raw::c_char, + type_: __itt_metadata_type, + ) -> __itt_counter, +>; +extern "C" { + pub static mut __itt_counter_create_typed_ptr__3_0: __itt_counter_create_typed_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Destroy the counter identified by the pointer previously returned by __itt_counter_create() or"] + #[doc = " __itt_counter_create_typed()"] + pub fn __itt_counter_destroy(id: __itt_counter); +} +pub type __itt_counter_destroy_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_counter_destroy_ptr__3_0: __itt_counter_destroy_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup markers"] + #[doc = " @brief Create a marker instance."] + #[doc = " @param[in] domain The domain for this marker"] + #[doc = " @param[in] clock_domain The clock domain controlling the execution of this call."] + #[doc = " @param[in] timestamp The user defined timestamp."] + #[doc = " @param[in] id The instance ID for this marker, or __itt_null"] + #[doc = " @param[in] name The name for this marker"] + #[doc = " @param[in] scope The scope for this marker"] + pub fn __itt_marker_ex( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + id: __itt_id, + name: *mut __itt_string_handle, + scope: __itt_scope, + ); +} +pub type __itt_marker_ex_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + id: __itt_id, + name: *mut __itt_string_handle, + scope: __itt_scope, + ), +>; +extern "C" { + pub static mut __itt_marker_ex_ptr__3_0: __itt_marker_ex_ptr__3_0_t; +} +extern "C" { + #[doc = " @ingroup clockdomain"] + #[doc = " @brief Add a relation to the current task instance."] + #[doc = " The current task instance is the head of the relation."] + #[doc = " @param[in] domain The domain controlling this call"] + #[doc = " @param[in] clock_domain The clock domain controlling the execution of this call."] + #[doc = " @param[in] timestamp The user defined timestamp."] + #[doc = " @param[in] relation The kind of relation"] + #[doc = " @param[in] tail The ID for the tail of the relation"] + pub fn __itt_relation_add_to_current_ex( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + relation: __itt_relation, + tail: __itt_id, + ); +} +extern "C" { + #[doc = " @ingroup clockdomain"] + #[doc = " @brief Add a relation between two instance identifiers."] + #[doc = " @param[in] domain The domain controlling this call"] + #[doc = " @param[in] clock_domain The clock domain controlling the execution of this call."] + #[doc = " @param[in] timestamp The user defined timestamp."] + #[doc = " @param[in] head The ID for the head of the relation"] + #[doc = " @param[in] relation The kind of relation"] + #[doc = " @param[in] tail The ID for the tail of the relation"] + pub fn __itt_relation_add_ex( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + head: __itt_id, + relation: __itt_relation, + tail: __itt_id, + ); +} +pub type __itt_relation_add_to_current_ex_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + relation: __itt_relation, + tail: __itt_id, + ), +>; +extern "C" { + pub static mut __itt_relation_add_to_current_ex_ptr__3_0: + __itt_relation_add_to_current_ex_ptr__3_0_t; +} +pub type __itt_relation_add_ex_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + domain: *const __itt_domain, + clock_domain: *mut __itt_clock_domain, + timestamp: ::std::os::raw::c_ulonglong, + head: __itt_id, + relation: __itt_relation, + tail: __itt_id, + ), +>; +extern "C" { + pub static mut __itt_relation_add_ex_ptr__3_0: __itt_relation_add_ex_ptr__3_0_t; +} +pub const ___itt_track_group_type___itt_track_group_type_normal: ___itt_track_group_type = 0; +#[doc = " @cond exclude_from_documentation"] +pub type ___itt_track_group_type = u32; +pub use self::___itt_track_group_type as __itt_track_group_type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ___itt_track_group { + #[doc = "< Name of the track group"] + pub name: *mut __itt_string_handle, + #[doc = "< List of child tracks"] + pub track: *mut ___itt_track, + #[doc = "< Type of the track group"] + pub tgtype: __itt_track_group_type, + #[doc = "< Reserved. Must be zero"] + pub extra1: ::std::os::raw::c_int, + #[doc = "< Reserved. Must be zero"] + pub extra2: *mut ::std::os::raw::c_void, + pub next: *mut ___itt_track_group, +} +#[test] +fn bindgen_test_layout____itt_track_group() { + assert_eq!( + ::std::mem::size_of::<___itt_track_group>(), + 40usize, + concat!("Size of: ", stringify!(___itt_track_group)) + ); + assert_eq!( + ::std::mem::align_of::<___itt_track_group>(), + 8usize, + concat!("Alignment of ", stringify!(___itt_track_group)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_track_group>())).name as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(___itt_track_group), + "::", + stringify!(name) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_track_group>())).track as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(___itt_track_group), + "::", + stringify!(track) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_track_group>())).tgtype as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(___itt_track_group), + "::", + stringify!(tgtype) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_track_group>())).extra1 as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(___itt_track_group), + "::", + stringify!(extra1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_track_group>())).extra2 as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(___itt_track_group), + "::", + stringify!(extra2) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_track_group>())).next as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(___itt_track_group), + "::", + stringify!(next) + ) + ); +} +pub type __itt_track_group = ___itt_track_group; +pub const ___itt_track_type___itt_track_type_normal: ___itt_track_type = 0; +#[doc = " @brief Placeholder for custom track types. Currently, \"normal\" custom track"] +#[doc = " is the only available track type."] +pub type ___itt_track_type = u32; +pub use self::___itt_track_type as __itt_track_type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ___itt_track { + #[doc = "< Name of the track group"] + pub name: *mut __itt_string_handle, + #[doc = "< Parent group to a track"] + pub group: *mut __itt_track_group, + #[doc = "< Type of the track"] + pub ttype: __itt_track_type, + #[doc = "< Reserved. Must be zero"] + pub extra1: ::std::os::raw::c_int, + #[doc = "< Reserved. Must be zero"] + pub extra2: *mut ::std::os::raw::c_void, + pub next: *mut ___itt_track, +} +#[test] +fn bindgen_test_layout____itt_track() { + assert_eq!( + ::std::mem::size_of::<___itt_track>(), + 40usize, + concat!("Size of: ", stringify!(___itt_track)) + ); + assert_eq!( + ::std::mem::align_of::<___itt_track>(), + 8usize, + concat!("Alignment of ", stringify!(___itt_track)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_track>())).name as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(___itt_track), + "::", + stringify!(name) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_track>())).group as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(___itt_track), + "::", + stringify!(group) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_track>())).ttype as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(___itt_track), + "::", + stringify!(ttype) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_track>())).extra1 as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(___itt_track), + "::", + stringify!(extra1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_track>())).extra2 as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(___itt_track), + "::", + stringify!(extra2) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_track>())).next as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(___itt_track), + "::", + stringify!(next) + ) + ); +} +pub type __itt_track = ___itt_track; +extern "C" { + #[doc = " @brief Create logical track group."] + pub fn __itt_track_group_create( + name: *mut __itt_string_handle, + track_group_type: __itt_track_group_type, + ) -> *mut __itt_track_group; +} +pub type __itt_track_group_create_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + name: *mut __itt_string_handle, + track_group_type: __itt_track_group_type, + ) -> *mut __itt_track_group, +>; +extern "C" { + pub static mut __itt_track_group_create_ptr__3_0: __itt_track_group_create_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Create logical track."] + pub fn __itt_track_create( + track_group: *mut __itt_track_group, + name: *mut __itt_string_handle, + track_type: __itt_track_type, + ) -> *mut __itt_track; +} +pub type __itt_track_create_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + track_group: *mut __itt_track_group, + name: *mut __itt_string_handle, + track_type: __itt_track_type, + ) -> *mut __itt_track, +>; +extern "C" { + pub static mut __itt_track_create_ptr__3_0: __itt_track_create_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Set the logical track."] + pub fn __itt_set_track(track: *mut __itt_track); +} +pub type __itt_set_track_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_set_track_ptr__3_0: __itt_set_track_ptr__3_0_t; +} +#[doc = " @cond exclude_from_gpa_documentation */"] +#[doc = " @defgroup events Events"] +#[doc = " @ingroup public"] +#[doc = " Events group"] +#[doc = " @{"] +pub type __itt_event = ::std::os::raw::c_int; +extern "C" { + pub fn __itt_event_create( + name: *const ::std::os::raw::c_char, + namelen: ::std::os::raw::c_int, + ) -> __itt_event; +} +pub type __itt_event_create_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + name: *const ::std::os::raw::c_char, + namelen: ::std::os::raw::c_int, + ) -> __itt_event, +>; +extern "C" { + pub static mut __itt_event_create_ptr__3_0: __itt_event_create_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Record an event occurrence."] + #[doc = " @return __itt_err upon failure (invalid event id/user event feature not enabled)"] + pub fn __itt_event_start(event: __itt_event) -> ::std::os::raw::c_int; +} +pub type __itt_event_start_ptr__3_0_t = + ::std::option::Option ::std::os::raw::c_int>; +extern "C" { + pub static mut __itt_event_start_ptr__3_0: __itt_event_start_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Record an event end occurrence."] + #[doc = " @note It is optional if events do not have durations."] + #[doc = " @return __itt_err upon failure (invalid event id/user event feature not enabled)"] + pub fn __itt_event_end(event: __itt_event) -> ::std::os::raw::c_int; +} +pub type __itt_event_end_ptr__3_0_t = + ::std::option::Option ::std::os::raw::c_int>; +extern "C" { + pub static mut __itt_event_end_ptr__3_0: __itt_event_end_ptr__3_0_t; +} +pub const __itt_av_data_type___itt_e_first: __itt_av_data_type = 0; +pub const __itt_av_data_type___itt_e_char: __itt_av_data_type = 0; +pub const __itt_av_data_type___itt_e_uchar: __itt_av_data_type = 1; +pub const __itt_av_data_type___itt_e_int16: __itt_av_data_type = 2; +pub const __itt_av_data_type___itt_e_uint16: __itt_av_data_type = 3; +pub const __itt_av_data_type___itt_e_int32: __itt_av_data_type = 4; +pub const __itt_av_data_type___itt_e_uint32: __itt_av_data_type = 5; +pub const __itt_av_data_type___itt_e_int64: __itt_av_data_type = 6; +pub const __itt_av_data_type___itt_e_uint64: __itt_av_data_type = 7; +pub const __itt_av_data_type___itt_e_float: __itt_av_data_type = 8; +pub const __itt_av_data_type___itt_e_double: __itt_av_data_type = 9; +pub const __itt_av_data_type___itt_e_last: __itt_av_data_type = 9; +#[doc = " @enum __itt_av_data_type"] +#[doc = " @brief Defines types of arrays data (for C/C++ intrinsic types)"] +pub type __itt_av_data_type = u32; +extern "C" { + pub fn __itt_av_save( + data: *mut ::std::os::raw::c_void, + rank: ::std::os::raw::c_int, + dimensions: *const ::std::os::raw::c_int, + type_: ::std::os::raw::c_int, + filePath: *const ::std::os::raw::c_char, + columnOrder: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +pub type __itt_av_save_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + data: *mut ::std::os::raw::c_void, + rank: ::std::os::raw::c_int, + dimensions: *const ::std::os::raw::c_int, + type_: ::std::os::raw::c_int, + filePath: *const ::std::os::raw::c_char, + columnOrder: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +extern "C" { + pub static mut __itt_av_save_ptr__3_0: __itt_av_save_ptr__3_0_t; +} +extern "C" { + #[doc = " @endcond"] + pub fn __itt_enable_attach(); +} +pub type __itt_enable_attach_ptr__3_0_t = ::std::option::Option; +extern "C" { + pub static mut __itt_enable_attach_ptr__3_0: __itt_enable_attach_ptr__3_0_t; +} +extern "C" { + pub fn __itt_module_load( + start_addr: *mut ::std::os::raw::c_void, + end_addr: *mut ::std::os::raw::c_void, + path: *const ::std::os::raw::c_char, + ); +} +pub type __itt_module_load_ptr__3_0_t = ::std::option::Option< + unsafe extern "C" fn( + start_addr: *mut ::std::os::raw::c_void, + end_addr: *mut ::std::os::raw::c_void, + path: *const ::std::os::raw::c_char, + ), +>; +extern "C" { + pub static mut __itt_module_load_ptr__3_0: __itt_module_load_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Report module unload"] + #[doc = " This API is used to report necessary information in case of bypassing default system loader."] + #[doc = " Notification should be done just before the module is unloaded from process memory."] + #[doc = " @param[in] addr - base address of loaded module"] + pub fn __itt_module_unload(addr: *mut ::std::os::raw::c_void); +} +pub type __itt_module_unload_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_module_unload_ptr__3_0: __itt_module_unload_ptr__3_0_t; +} +pub const __itt_module_type___itt_module_type_unknown: __itt_module_type = 0; +pub const __itt_module_type___itt_module_type_elf: __itt_module_type = 1; +pub const __itt_module_type___itt_module_type_coff: __itt_module_type = 2; +#[doc = " @cond exclude_from_documentation"] +pub type __itt_module_type = u32; +pub const __itt_section_type_itt_section_type_unknown: __itt_section_type = 0; +pub const __itt_section_type_itt_section_type_bss: __itt_section_type = 1; +pub const __itt_section_type_itt_section_type_data: __itt_section_type = 2; +pub const __itt_section_type_itt_section_type_text: __itt_section_type = 3; +#[doc = " @cond exclude_from_documentation"] +pub type __itt_section_type = u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ___itt_section_info { + #[doc = "< Section name in UTF8"] + pub name: *const ::std::os::raw::c_char, + #[doc = "< Section content and semantics description"] + pub type_: __itt_section_type, + #[doc = "< Section bit flags that describe attributes using bit mask"] + #[doc = " Zero if disabled, non-zero if enabled"] + pub flags: usize, + #[doc = "< Section load(relocated) start address"] + pub start_addr: *mut ::std::os::raw::c_void, + #[doc = "< Section file offset"] + pub size: usize, + #[doc = "< Section size"] + pub file_offset: usize, +} +#[test] +fn bindgen_test_layout____itt_section_info() { + assert_eq!( + ::std::mem::size_of::<___itt_section_info>(), + 48usize, + concat!("Size of: ", stringify!(___itt_section_info)) + ); + assert_eq!( + ::std::mem::align_of::<___itt_section_info>(), + 8usize, + concat!("Alignment of ", stringify!(___itt_section_info)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_section_info>())).name as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(___itt_section_info), + "::", + stringify!(name) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_section_info>())).type_ as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(___itt_section_info), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_section_info>())).flags as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(___itt_section_info), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_section_info>())).start_addr as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(___itt_section_info), + "::", + stringify!(start_addr) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_section_info>())).size as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(___itt_section_info), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_section_info>())).file_offset as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(___itt_section_info), + "::", + stringify!(file_offset) + ) + ); +} +pub type __itt_section_info = ___itt_section_info; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ___itt_module_object { + #[doc = "< API version"] + pub version: ::std::os::raw::c_uint, + #[doc = "< Unique identifier. This is unchanged for sections that belong to the same module"] + pub module_id: __itt_id, + #[doc = "< Binary module format"] + pub module_type: __itt_module_type, + #[doc = "< Unique module name or path to module in UTF8"] + #[doc = " Contains module name when module_bufer and module_size exist"] + #[doc = " Contains module path when module_bufer and module_size absent"] + #[doc = " module_name remains the same for the certain module_id"] + pub module_name: *const ::std::os::raw::c_char, + #[doc = "< Module buffer content"] + pub module_buffer: *mut ::std::os::raw::c_void, + #[doc = "< Module buffer size */"] + #[doc = " If module_buffer and module_size do not exist,"] + #[doc = " the binary module exists on the system already."] + #[doc = " The module_name parameter contains the path to the module."] + pub module_size: usize, + #[doc = "< Reference to section information"] + pub section_array: *mut __itt_section_info, + pub section_number: usize, +} +#[test] +fn bindgen_test_layout____itt_module_object() { + assert_eq!( + ::std::mem::size_of::<___itt_module_object>(), + 80usize, + concat!("Size of: ", stringify!(___itt_module_object)) + ); + assert_eq!( + ::std::mem::align_of::<___itt_module_object>(), + 8usize, + concat!("Alignment of ", stringify!(___itt_module_object)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_module_object>())).version as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(___itt_module_object), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<___itt_module_object>())).module_id as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(___itt_module_object), + "::", + stringify!(module_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<___itt_module_object>())).module_type as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(___itt_module_object), + "::", + stringify!(module_type) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<___itt_module_object>())).module_name as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(___itt_module_object), + "::", + stringify!(module_name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<___itt_module_object>())).module_buffer as *const _ as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(___itt_module_object), + "::", + stringify!(module_buffer) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<___itt_module_object>())).module_size as *const _ as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(___itt_module_object), + "::", + stringify!(module_size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<___itt_module_object>())).section_array as *const _ as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(___itt_module_object), + "::", + stringify!(section_array) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<___itt_module_object>())).section_number as *const _ as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(___itt_module_object), + "::", + stringify!(section_number) + ) + ); +} +pub type __itt_module_object = ___itt_module_object; +extern "C" { + #[doc = " @brief Load module content and its loaded(relocated) sections."] + #[doc = " This API is useful to save a module, or specify its location on the system and report information about loaded sections."] + #[doc = " The target module is saved on the system if module buffer content and size are available."] + #[doc = " If module buffer content and size are unavailable, the module name contains the path to the existing binary module."] + #[doc = " @param[in] module_obj - provides module and section information, along with unique module identifiers (name,module ID)"] + #[doc = " which bind the binary module to particular sections."] + pub fn __itt_module_load_with_sections(module_obj: *mut __itt_module_object); +} +pub type __itt_module_load_with_sections_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_module_load_with_sections_ptr__3_0: + __itt_module_load_with_sections_ptr__3_0_t; +} +extern "C" { + #[doc = " @brief Unload a module and its loaded(relocated) sections."] + #[doc = " This API notifies that the module and its sections were unloaded."] + #[doc = " @param[in] module_obj - provides module and sections information, along with unique module identifiers (name,module ID)"] + #[doc = " which bind the binary module to particular sections."] + pub fn __itt_module_unload_with_sections(module_obj: *mut __itt_module_object); +} +pub type __itt_module_unload_with_sections_ptr__3_0_t = + ::std::option::Option; +extern "C" { + pub static mut __itt_module_unload_with_sections_ptr__3_0: + __itt_module_unload_with_sections_ptr__3_0_t; +} diff --git a/deps/v8/third_party/ittapi/ittapi-rs/src/jitprofiling_bindings.rs b/deps/v8/third_party/ittapi/ittapi-rs/src/jitprofiling_bindings.rs new file mode 100644 index 00000000000000..3b3bc23f646480 --- /dev/null +++ b/deps/v8/third_party/ittapi/ittapi-rs/src/jitprofiling_bindings.rs @@ -0,0 +1,1002 @@ +/* automatically generated by rust-bindgen */ + +#[doc = "<\\brief Send this to shutdown the agent."] +#[doc = " Use NULL for event data."] +pub const iJIT_jvm_event_iJVM_EVENT_TYPE_SHUTDOWN: iJIT_jvm_event = 2; +#[doc = "<\\brief Send when dynamic code is"] +#[doc = " JIT compiled and loaded into"] +#[doc = " memory by the JIT engine, but"] +#[doc = " before the code is executed."] +#[doc = " Use iJIT_Method_Load as event"] +#[doc = " data."] +pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED: iJIT_jvm_event = 13; +#[doc = "<\\brief Send when compiled dynamic"] +#[doc = " code is being unloaded from memory."] +#[doc = " Use iJIT_Method_Load as event data."] +pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UNLOAD_START: iJIT_jvm_event = 14; +#[doc = "<\\brief Send to provide new content for"] +#[doc = " a previously reported dynamic code."] +#[doc = " The previous content will be invalidated"] +#[doc = " starting from the time of the notification."] +#[doc = " Use iJIT_Method_Load as event data but"] +#[doc = " required fields are following:"] +#[doc = " - method_id identify the code to update."] +#[doc = " - method_load_address specify start address"] +#[doc = " within identified code range"] +#[doc = " where update should be started."] +#[doc = " - method_size specify length of updated code"] +#[doc = " range."] +pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UPDATE: iJIT_jvm_event = 15; +#[doc = "<\\brief Send when an inline dynamic"] +#[doc = " code is JIT compiled and loaded"] +#[doc = " into memory by the JIT engine,"] +#[doc = " but before the parent code region"] +#[doc = " starts executing."] +#[doc = " Use iJIT_Method_Inline_Load as event data."] +pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED: iJIT_jvm_event = 16; +#[doc = " @cond exclude_from_documentation"] +pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_UPDATE_V2: iJIT_jvm_event = 17; +#[doc = "<\\brief Send when a dynamic code is"] +#[doc = " JIT compiled and loaded into"] +#[doc = " memory by the JIT engine, but"] +#[doc = " before the code is executed."] +#[doc = " Use iJIT_Method_Load_V2 as event data."] +pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2: iJIT_jvm_event = 21; +#[doc = "<\\brief Send when a dynamic code is"] +#[doc = " JIT compiled and loaded into"] +#[doc = " memory by the JIT engine, but"] +#[doc = " before the code is executed."] +#[doc = " Use iJIT_Method_Load_V3 as event data."] +pub const iJIT_jvm_event_iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3: iJIT_jvm_event = 22; +#[doc = " @brief Enumerator for the types of notifications"] +pub type iJIT_jvm_event = u32; +pub use self::iJIT_jvm_event as iJIT_JVM_EVENT; +#[doc = "<\\brief The agent is not running;"] +#[doc = " iJIT_NotifyEvent calls will"] +#[doc = " not be processed."] +pub const _iJIT_IsProfilingActiveFlags_iJIT_NOTHING_RUNNING: _iJIT_IsProfilingActiveFlags = 0; +#[doc = "<\\brief The agent is running and"] +#[doc = " ready to process notifications."] +pub const _iJIT_IsProfilingActiveFlags_iJIT_SAMPLING_ON: _iJIT_IsProfilingActiveFlags = 1; +#[doc = " @brief Enumerator for the agent's mode"] +pub type _iJIT_IsProfilingActiveFlags = u32; +pub use self::_iJIT_IsProfilingActiveFlags as iJIT_IsProfilingActiveFlags; +#[doc = " @brief Description of a single entry in the line number information of a code region."] +#[doc = " @details A table of line number entries gives information about how the reported code region"] +#[doc = " is mapped to source file."] +#[doc = " Intel(R) VTune(TM) Amplifier uses line number information to attribute"] +#[doc = " the samples (virtual address) to a line number. \\n"] +#[doc = " It is acceptable to report different code addresses for the same source line:"] +#[doc = " @code"] +#[doc = " Offset LineNumber"] +#[doc = " 1 2"] +#[doc = " 12 4"] +#[doc = " 15 2"] +#[doc = " 18 1"] +#[doc = " 21 30"] +#[doc = ""] +#[doc = " VTune Amplifier constructs the following table using the client data"] +#[doc = ""] +#[doc = " Code subrange Line number"] +#[doc = " 0-1 2"] +#[doc = " 1-12 4"] +#[doc = " 12-15 2"] +#[doc = " 15-18 1"] +#[doc = " 18-21 30"] +#[doc = " @endcode"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _LineNumberInfo { + #[doc = "<\\brief Offset from the begining of the code region."] + pub Offset: ::std::os::raw::c_uint, + #[doc = "<\\brief Matching source line number offset (from beginning of source file)."] + pub LineNumber: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout__LineNumberInfo() { + assert_eq!( + ::std::mem::size_of::<_LineNumberInfo>(), + 8usize, + concat!("Size of: ", stringify!(_LineNumberInfo)) + ); + assert_eq!( + ::std::mem::align_of::<_LineNumberInfo>(), + 4usize, + concat!("Alignment of ", stringify!(_LineNumberInfo)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_LineNumberInfo>())).Offset as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_LineNumberInfo), + "::", + stringify!(Offset) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_LineNumberInfo>())).LineNumber as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_LineNumberInfo), + "::", + stringify!(LineNumber) + ) + ); +} +pub type pLineNumberInfo = *mut _LineNumberInfo; +pub type LineNumberInfo = _LineNumberInfo; +#[doc = "<\\brief Native to the process architecture that is calling it."] +pub const _iJIT_CodeArchitecture_iJIT_CA_NATIVE: _iJIT_CodeArchitecture = 0; +#[doc = "<\\brief 32-bit machine code."] +pub const _iJIT_CodeArchitecture_iJIT_CA_32: _iJIT_CodeArchitecture = 1; +#[doc = "<\\brief 64-bit machine code."] +pub const _iJIT_CodeArchitecture_iJIT_CA_64: _iJIT_CodeArchitecture = 2; +#[doc = " @brief Enumerator for the code architecture."] +pub type _iJIT_CodeArchitecture = u32; +pub use self::_iJIT_CodeArchitecture as iJIT_CodeArchitecture; +#[doc = " @brief Description of a JIT-compiled method"] +#[doc = " @details When you use the iJIT_Method_Load structure to describe"] +#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED"] +#[doc = " as an event type to report it."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _iJIT_Method_Load { + #[doc = "<\\brief Unique method ID. Cannot be 0."] + #[doc = " You must either use the API function"] + #[doc = " iJIT_GetNewMethodID to get a valid and unique"] + #[doc = " method ID, or else manage ID uniqueness"] + #[doc = " and correct range by yourself.\\n"] + #[doc = " You must use the same method ID for all code"] + #[doc = " regions of the same method, otherwise different"] + #[doc = " method IDs specify different methods."] + pub method_id: ::std::os::raw::c_uint, + #[doc = "<\\brief The name of the method. It can be optionally"] + #[doc = " prefixed with its class name and appended with"] + #[doc = " its complete signature. Can't be NULL."] + pub method_name: *mut ::std::os::raw::c_char, + #[doc = "<\\brief The start virtual address of the method code"] + #[doc = " region. If NULL, data provided with"] + #[doc = " event are not accepted."] + pub method_load_address: *mut ::std::os::raw::c_void, + #[doc = "<\\brief The code size of the method in memory."] + #[doc = " If 0, then data provided with the event are not"] + #[doc = " accepted."] + pub method_size: ::std::os::raw::c_uint, + #[doc = "<\\brief The number of entries in the line number"] + #[doc = " table.0 if none."] + pub line_number_size: ::std::os::raw::c_uint, + #[doc = "<\\brief Pointer to the line numbers info"] + #[doc = " array. Can be NULL if"] + #[doc = " line_number_size is 0. See"] + #[doc = " LineNumberInfo Structure for a"] + #[doc = " description of a single entry in"] + #[doc = " the line number info array"] + pub line_number_table: pLineNumberInfo, + #[doc = "<\\brief This field is obsolete."] + pub class_id: ::std::os::raw::c_uint, + #[doc = "<\\brief Class name. Can be NULL."] + pub class_file_name: *mut ::std::os::raw::c_char, + #[doc = "<\\brief Source file name. Can be NULL."] + pub source_file_name: *mut ::std::os::raw::c_char, +} +#[test] +fn bindgen_test_layout__iJIT_Method_Load() { + assert_eq!( + ::std::mem::size_of::<_iJIT_Method_Load>(), + 64usize, + concat!("Size of: ", stringify!(_iJIT_Method_Load)) + ); + assert_eq!( + ::std::mem::align_of::<_iJIT_Method_Load>(), + 8usize, + concat!("Alignment of ", stringify!(_iJIT_Method_Load)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_id as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load), + "::", + stringify!(method_id) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_name as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load), + "::", + stringify!(method_name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_load_address as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load), + "::", + stringify!(method_load_address) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).method_size as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load), + "::", + stringify!(method_size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load>())).line_number_size as *const _ as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load), + "::", + stringify!(line_number_size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load>())).line_number_table as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load), + "::", + stringify!(line_number_table) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load>())).class_id as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load), + "::", + stringify!(class_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load>())).class_file_name as *const _ as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load), + "::", + stringify!(class_file_name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load>())).source_file_name as *const _ as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load), + "::", + stringify!(source_file_name) + ) + ); +} +pub type piJIT_Method_Load = *mut _iJIT_Method_Load; +pub type iJIT_Method_Load = _iJIT_Method_Load; +#[doc = " @brief Description of a JIT-compiled method"] +#[doc = " @details When you use the iJIT_Method_Load_V2 structure to describe"] +#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2"] +#[doc = " as an event type to report it."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _iJIT_Method_Load_V2 { + #[doc = "<\\brief Unique method ID. Cannot be 0."] + #[doc = " You must either use the API function"] + #[doc = " iJIT_GetNewMethodID to get a valid and unique"] + #[doc = " method ID, or else manage ID uniqueness"] + #[doc = " and correct range by yourself.\\n"] + #[doc = " You must use the same method ID for all code"] + #[doc = " regions of the same method, otherwise different"] + #[doc = " method IDs specify different methods."] + pub method_id: ::std::os::raw::c_uint, + #[doc = "<\\brief The name of the method. It can be optionally"] + #[doc = " prefixed with its class name and appended with"] + #[doc = " its complete signature. Can't be NULL."] + pub method_name: *mut ::std::os::raw::c_char, + #[doc = "<\\brief The start virtual address of the method code"] + #[doc = " region. If NULL, then data provided with the"] + #[doc = " event are not accepted."] + pub method_load_address: *mut ::std::os::raw::c_void, + #[doc = "<\\brief The code size of the method in memory."] + #[doc = " If 0, then data provided with the event are not"] + #[doc = " accepted."] + pub method_size: ::std::os::raw::c_uint, + #[doc = "<\\brief The number of entries in the line number"] + #[doc = " table. 0 if none."] + pub line_number_size: ::std::os::raw::c_uint, + #[doc = "<\\brief Pointer to the line numbers info"] + #[doc = " array. Can be NULL if"] + #[doc = " line_number_size is 0. See"] + #[doc = " LineNumberInfo Structure for a"] + #[doc = " description of a single entry in"] + #[doc = " the line number info array."] + pub line_number_table: pLineNumberInfo, + #[doc = "<\\brief Class name. Can be NULL."] + pub class_file_name: *mut ::std::os::raw::c_char, + #[doc = "<\\brief Source file name. Can be NULL."] + pub source_file_name: *mut ::std::os::raw::c_char, + #[doc = "<\\brief Module name. Can be NULL."] + #[doc = "The module name can be useful for distinguishing among"] + #[doc = "different JIT engines. VTune Amplifier will display"] + #[doc = "reported methods grouped by specific module."] + pub module_name: *mut ::std::os::raw::c_char, +} +#[test] +fn bindgen_test_layout__iJIT_Method_Load_V2() { + assert_eq!( + ::std::mem::size_of::<_iJIT_Method_Load_V2>(), + 64usize, + concat!("Size of: ", stringify!(_iJIT_Method_Load_V2)) + ); + assert_eq!( + ::std::mem::align_of::<_iJIT_Method_Load_V2>(), + 8usize, + concat!("Alignment of ", stringify!(_iJIT_Method_Load_V2)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_id as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V2), + "::", + stringify!(method_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_name as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V2), + "::", + stringify!(method_name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_load_address as *const _ + as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V2), + "::", + stringify!(method_load_address) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).method_size as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V2), + "::", + stringify!(method_size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).line_number_size as *const _ as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V2), + "::", + stringify!(line_number_size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).line_number_table as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V2), + "::", + stringify!(line_number_table) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).class_file_name as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V2), + "::", + stringify!(class_file_name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).source_file_name as *const _ as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V2), + "::", + stringify!(source_file_name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V2>())).module_name as *const _ as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V2), + "::", + stringify!(module_name) + ) + ); +} +pub type piJIT_Method_Load_V2 = *mut _iJIT_Method_Load_V2; +pub type iJIT_Method_Load_V2 = _iJIT_Method_Load_V2; +#[doc = " @brief Description of a JIT-compiled method"] +#[doc = " @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2"] +#[doc = " with a newly introduced 'arch' field that specifies architecture of the code region."] +#[doc = " When you use the iJIT_Method_Load_V3 structure to describe"] +#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3"] +#[doc = " as an event type to report it."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _iJIT_Method_Load_V3 { + #[doc = "<\\brief Unique method ID. Cannot be 0."] + #[doc = " You must either use the API function"] + #[doc = " iJIT_GetNewMethodID to get a valid and unique"] + #[doc = " method ID, or manage ID uniqueness"] + #[doc = " and correct range by yourself.\\n"] + #[doc = " You must use the same method ID for all code"] + #[doc = " regions of the same method, otherwise they are"] + #[doc = " treated as regions of different methods."] + pub method_id: ::std::os::raw::c_uint, + #[doc = "<\\brief The name of the method. It can be optionally"] + #[doc = " prefixed with its class name and appended with"] + #[doc = " its complete signature. Cannot be NULL."] + pub method_name: *mut ::std::os::raw::c_char, + #[doc = "<\\brief The start virtual address of the method code"] + #[doc = " region. If NULL, then data provided with the"] + #[doc = " event are not accepted."] + pub method_load_address: *mut ::std::os::raw::c_void, + #[doc = "<\\brief The code size of the method in memory."] + #[doc = " If 0, then data provided with the event are not"] + #[doc = " accepted."] + pub method_size: ::std::os::raw::c_uint, + #[doc = "<\\brief The number of entries in the line number"] + #[doc = " table. 0 if none."] + pub line_number_size: ::std::os::raw::c_uint, + #[doc = "<\\brief Pointer to the line numbers info"] + #[doc = " array. Can be NULL if"] + #[doc = " line_number_size is 0. See"] + #[doc = " LineNumberInfo Structure for a"] + #[doc = " description of a single entry in"] + #[doc = " the line number info array."] + pub line_number_table: pLineNumberInfo, + #[doc = "<\\brief Class name. Can be NULL."] + pub class_file_name: *mut ::std::os::raw::c_char, + #[doc = "<\\brief Source file name. Can be NULL."] + pub source_file_name: *mut ::std::os::raw::c_char, + #[doc = "<\\brief Module name. Can be NULL."] + #[doc = " The module name can be useful for distinguishing among"] + #[doc = " different JIT engines. VTune Amplifier will display"] + #[doc = " reported methods grouped by specific module."] + pub module_name: *mut ::std::os::raw::c_char, + #[doc = "<\\brief Architecture of the method's code region."] + #[doc = " By default, it is the same as the process"] + #[doc = " architecture that is calling it."] + #[doc = " For example, you can use it if your 32-bit JIT"] + #[doc = " engine generates 64-bit code."] + #[doc = ""] + #[doc = " If JIT engine reports both 32-bit and 64-bit types"] + #[doc = " of methods then VTune Amplifier splits the methods"] + #[doc = " with the same module name but with different"] + #[doc = " architectures in two different modules. VTune Amplifier"] + #[doc = " modifies the original name provided with a 64-bit method"] + #[doc = " version by ending it with '(64)'"] + pub module_arch: iJIT_CodeArchitecture, +} +#[test] +fn bindgen_test_layout__iJIT_Method_Load_V3() { + assert_eq!( + ::std::mem::size_of::<_iJIT_Method_Load_V3>(), + 72usize, + concat!("Size of: ", stringify!(_iJIT_Method_Load_V3)) + ); + assert_eq!( + ::std::mem::align_of::<_iJIT_Method_Load_V3>(), + 8usize, + concat!("Alignment of ", stringify!(_iJIT_Method_Load_V3)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_id as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V3), + "::", + stringify!(method_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_name as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V3), + "::", + stringify!(method_name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_load_address as *const _ + as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V3), + "::", + stringify!(method_load_address) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).method_size as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V3), + "::", + stringify!(method_size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).line_number_size as *const _ as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V3), + "::", + stringify!(line_number_size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).line_number_table as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V3), + "::", + stringify!(line_number_table) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).class_file_name as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V3), + "::", + stringify!(class_file_name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).source_file_name as *const _ as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V3), + "::", + stringify!(source_file_name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).module_name as *const _ as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V3), + "::", + stringify!(module_name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Load_V3>())).module_arch as *const _ as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Load_V3), + "::", + stringify!(module_arch) + ) + ); +} +pub type piJIT_Method_Load_V3 = *mut _iJIT_Method_Load_V3; +pub type iJIT_Method_Load_V3 = _iJIT_Method_Load_V3; +#[doc = " @brief Description of an inline JIT-compiled method"] +#[doc = " @details When you use the_iJIT_Method_Inline_Load structure to describe"] +#[doc = " the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED"] +#[doc = " as an event type to report it."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _iJIT_Method_Inline_Load { + #[doc = "<\\brief Unique method ID. Cannot be 0."] + #[doc = " You must either use the API function"] + #[doc = " iJIT_GetNewMethodID to get a valid and unique"] + #[doc = " method ID, or else manage ID uniqueness"] + #[doc = " and correct range by yourself."] + pub method_id: ::std::os::raw::c_uint, + #[doc = "<\\brief Unique immediate parent's method ID."] + #[doc = " Cannot be 0."] + #[doc = " You must either use the API function"] + #[doc = " iJIT_GetNewMethodID to get a valid and unique"] + #[doc = " method ID, or else manage ID uniqueness"] + #[doc = " and correct range by yourself."] + pub parent_method_id: ::std::os::raw::c_uint, + #[doc = "<\\brief The name of the method. It can be optionally"] + #[doc = " prefixed with its class name and appended with"] + #[doc = " its complete signature. Can't be NULL."] + pub method_name: *mut ::std::os::raw::c_char, + pub method_load_address: *mut ::std::os::raw::c_void, + #[doc = "<\\brief The code size of the method in memory."] + #[doc = " If 0, then data provided with the event are not"] + #[doc = " accepted."] + pub method_size: ::std::os::raw::c_uint, + #[doc = "<\\brief The number of entries in the line number"] + #[doc = " table. 0 if none."] + pub line_number_size: ::std::os::raw::c_uint, + #[doc = "<\\brief Pointer to the line numbers info"] + #[doc = " array. Can be NULL if"] + #[doc = " line_number_size is 0. See"] + #[doc = " LineNumberInfo Structure for a"] + #[doc = " description of a single entry in"] + #[doc = " the line number info array"] + pub line_number_table: pLineNumberInfo, + #[doc = "<\\brief Class name. Can be NULL."] + pub class_file_name: *mut ::std::os::raw::c_char, + #[doc = "<\\brief Source file name. Can be NULL."] + pub source_file_name: *mut ::std::os::raw::c_char, +} +#[test] +fn bindgen_test_layout__iJIT_Method_Inline_Load() { + assert_eq!( + ::std::mem::size_of::<_iJIT_Method_Inline_Load>(), + 56usize, + concat!("Size of: ", stringify!(_iJIT_Method_Inline_Load)) + ); + assert_eq!( + ::std::mem::align_of::<_iJIT_Method_Inline_Load>(), + 8usize, + concat!("Alignment of ", stringify!(_iJIT_Method_Inline_Load)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_id as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Inline_Load), + "::", + stringify!(method_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).parent_method_id as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Inline_Load), + "::", + stringify!(parent_method_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_name as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Inline_Load), + "::", + stringify!(method_name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_load_address as *const _ + as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Inline_Load), + "::", + stringify!(method_load_address) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).method_size as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Inline_Load), + "::", + stringify!(method_size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).line_number_size as *const _ + as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Inline_Load), + "::", + stringify!(line_number_size) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).line_number_table as *const _ + as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Inline_Load), + "::", + stringify!(line_number_table) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).class_file_name as *const _ + as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Inline_Load), + "::", + stringify!(class_file_name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Inline_Load>())).source_file_name as *const _ + as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Inline_Load), + "::", + stringify!(source_file_name) + ) + ); +} +pub type piJIT_Method_Inline_Load = *mut _iJIT_Method_Inline_Load; +pub type iJIT_Method_Inline_Load = _iJIT_Method_Inline_Load; +pub const _iJIT_SegmentType_iJIT_CT_UNKNOWN: _iJIT_SegmentType = 0; +#[doc = "<\\brief Executable code."] +pub const _iJIT_SegmentType_iJIT_CT_CODE: _iJIT_SegmentType = 1; +#[doc = "<\\brief Data (not executable code)."] +#[doc = " VTune Amplifier uses the format string"] +#[doc = " (see iJIT_Method_Update) to represent"] +#[doc = " this data in the VTune Amplifier GUI"] +pub const _iJIT_SegmentType_iJIT_CT_DATA: _iJIT_SegmentType = 2; +#[doc = "<\\brief Use the previous markup for the trace."] +#[doc = " Can be used for the following"] +#[doc = " iJVM_EVENT_TYPE_METHOD_UPDATE_V2 events,"] +#[doc = " if the type of the previously reported segment"] +#[doc = " type is the same."] +pub const _iJIT_SegmentType_iJIT_CT_KEEP: _iJIT_SegmentType = 3; +pub const _iJIT_SegmentType_iJIT_CT_EOF: _iJIT_SegmentType = 4; +#[doc = " @cond exclude_from_documentation */"] +#[doc = " @brief Description of a segment type"] +#[doc = " @details Use the segment type to specify a type of data supplied"] +#[doc = " with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to"] +#[doc = " a certain code trace."] +pub type _iJIT_SegmentType = u32; +pub use self::_iJIT_SegmentType as iJIT_SegmentType; +#[doc = " @brief Description of a dynamic update of the content within JIT-compiled method"] +#[doc = " @details The JIT engine may generate the methods that are updated at runtime"] +#[doc = " partially by mixed (data + executable code) content. When you use the iJIT_Method_Update"] +#[doc = " structure to describe the update of the content within a JIT-compiled method,"] +#[doc = " use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it."] +#[doc = ""] +#[doc = " On the first Update event, VTune Amplifier copies the original code range reported by"] +#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and"] +#[doc = " adds the modified range to the original method. For next update events, VTune Amplifier"] +#[doc = " does the same but it uses the latest modified version of a code region for update."] +#[doc = " Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by"] +#[doc = " the iJVM_EVENT_TYPE_METHOD_LOAD event."] +#[doc = " Notes:"] +#[doc = " - Multiple update events with different types for the same trace are allowed"] +#[doc = " but they must be reported for the same code ranges."] +#[doc = " Example,"] +#[doc = " @code"] +#[doc = " [-- data---] Allowed"] +#[doc = " [-- code --] Allowed"] +#[doc = " [code] Ignored"] +#[doc = " [-- data---] Allowed"] +#[doc = " [-- code --] Allowed"] +#[doc = " [------------ trace ---------]"] +#[doc = " @endcode"] +#[doc = " - The types of previously reported events can be changed but they must be reported"] +#[doc = " for the same code ranges."] +#[doc = " Example,"] +#[doc = " @code"] +#[doc = " [-- data---] Allowed"] +#[doc = " [-- code --] Allowed"] +#[doc = " [-- data---] Allowed"] +#[doc = " [-- code --] Allowed"] +#[doc = " [------------ trace ---------]"] +#[doc = " @endcode"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _iJIT_Method_Update { + #[doc = "<\\brief Start address of the update within a method"] + pub load_address: *mut ::std::os::raw::c_void, + #[doc = "<\\brief The update size"] + pub size: ::std::os::raw::c_uint, + #[doc = "<\\brief Type of the update"] + pub type_: iJIT_SegmentType, + #[doc = "<\\brief C string that contains a format string"] + #[doc = " that follows the same specifications as format in printf."] + #[doc = " The format string is used for iJIT_CT_CODE only"] + #[doc = " and cannot be NULL."] + #[doc = " Format can be changed on the fly."] + pub data_format: *const ::std::os::raw::c_char, +} +#[test] +fn bindgen_test_layout__iJIT_Method_Update() { + assert_eq!( + ::std::mem::size_of::<_iJIT_Method_Update>(), + 24usize, + concat!("Size of: ", stringify!(_iJIT_Method_Update)) + ); + assert_eq!( + ::std::mem::align_of::<_iJIT_Method_Update>(), + 8usize, + concat!("Alignment of ", stringify!(_iJIT_Method_Update)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_iJIT_Method_Update>())).load_address as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Update), + "::", + stringify!(load_address) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_iJIT_Method_Update>())).size as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Update), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_iJIT_Method_Update>())).type_ as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Update), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_iJIT_Method_Update>())).data_format as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_iJIT_Method_Update), + "::", + stringify!(data_format) + ) + ); +} +pub type piJIT_Method_Update = *mut _iJIT_Method_Update; +pub type iJIT_Method_Update = _iJIT_Method_Update; +extern "C" { + #[doc = " @brief Generates a new unique method ID."] + #[doc = ""] + #[doc = " You must use this API to obtain unique and valid method IDs for methods or"] + #[doc = " traces reported to the agent if you don't have your own mechanism to generate"] + #[doc = " unique method IDs."] + #[doc = ""] + #[doc = " @return a new unique method ID. When out of unique method IDs, this API"] + #[doc = " returns 0, which is not an accepted value."] + pub fn iJIT_GetNewMethodID() -> ::std::os::raw::c_uint; +} +extern "C" { + #[doc = " @brief Returns the current mode of the agent."] + #[doc = ""] + #[doc = " @return iJIT_SAMPLING_ON, indicating that agent is running, or"] + #[doc = " iJIT_NOTHING_RUNNING if no agent is running."] + pub fn iJIT_IsProfilingActive() -> iJIT_IsProfilingActiveFlags; +} +extern "C" { + #[doc = " @brief Reports infomation about JIT-compiled code to the agent."] + #[doc = ""] + #[doc = " The reported information is used to attribute samples obtained from any"] + #[doc = " Intel(R) VTune(TM) Amplifier collector. This API needs to be called"] + #[doc = " after JIT compilation and before the first entry into the JIT-compiled"] + #[doc = " code."] + #[doc = ""] + #[doc = " @param[in] event_type - type of the data sent to the agent"] + #[doc = " @param[in] EventSpecificData - pointer to event-specific data"] + #[doc = ""] + #[doc = " @returns 1 on success, otherwise 0."] + pub fn iJIT_NotifyEvent( + event_type: iJIT_JVM_EVENT, + EventSpecificData: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; +} diff --git a/deps/v8/third_party/ittapi/ittapi-rs/src/lib.rs b/deps/v8/third_party/ittapi/ittapi-rs/src/lib.rs new file mode 100644 index 00000000000000..0ce85516a54ce2 --- /dev/null +++ b/deps/v8/third_party/ittapi/ittapi-rs/src/lib.rs @@ -0,0 +1,4 @@ +#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] +#![allow(unused)] +include!("ittnotify_bindings.rs"); +include!("jitprofiling_bindings.rs"); diff --git a/deps/v8/third_party/ittapi/ittapi-rs/tests/bindgen-up-to-date.rs b/deps/v8/third_party/ittapi/ittapi-rs/tests/bindgen-up-to-date.rs new file mode 100644 index 00000000000000..d3eb75da715dd7 --- /dev/null +++ b/deps/v8/third_party/ittapi/ittapi-rs/tests/bindgen-up-to-date.rs @@ -0,0 +1,68 @@ +// This is a smoke test for pre-generated `src/ittapi-bindings.rs` and +// `src/jitprofiling-bindings.rs` files to see that they don't need to be +// updated. We check in a generated version so downstream consumers don't +// have to get `bindgen` working themselves. +// +// If bindgen or ittapi.h or jitprofiling.h change you can run tests with +// `BLESS=1` (inpired by a similiar pach for binaryen) to regenerate the +// source files, otherwise this can test on CI that the file doesn't need +// to be regenerated. + +#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] +#![allow(unused)] + +#[test] +fn test_ittnotify_bindings_up_to_date() { + let expected = bindgen::Builder::default() + .rustfmt_bindings(true) + .header("./include/ittnotify.h") + .generate() + .expect("Unable to generate ittnotify bindings.") + .to_string(); + + if std::env::var("BLESS").is_ok() { + std::fs::write("src/ittnotify_bindings.rs", expected).unwrap(); + } else { + let actual = include_str!("../src/ittnotify_bindings.rs"); + if expected == actual { + return; + } + + for diff in diff::lines(&expected, &actual) { + match diff { + diff::Result::Both(_, s) => println!(" {}", s), + diff::Result::Left(s) => println!("-{}", s), + diff::Result::Right(s) => println!("+{}", s), + } + } + panic!("differences found, need to regenerate ittnotify bindings"); + } +} + +#[test] +fn test_jitprofiling_bindings_up_to_date() { + let expected = bindgen::Builder::default() + .rustfmt_bindings(true) + .header("./include/jitprofiling.h") + .generate() + .expect("Unable to generate jitprofiling bindings") + .to_string(); + + if std::env::var("BLESS").is_ok() { + std::fs::write("src/jitprofiling_bindings.rs", expected).unwrap(); + } else { + let actual = include_str!("../src/jitprofiling_bindings.rs"); + if expected == actual { + return; + } + + for diff in diff::lines(&expected, &actual) { + match diff { + diff::Result::Both(_, s) => println!(" {}", s), + diff::Result::Left(s) => println!("-{}", s), + diff::Result::Right(s) => println!("+{}", s), + } + } + panic!("differences found, need to regenerate jitprofiling bindings"); + } +} diff --git a/deps/v8/third_party/ittapi/src/ittnotify/disable_warnings.h b/deps/v8/third_party/ittapi/src/ittnotify/disable_warnings.h index a7a2b13bc79bcd..4ebdd77e446344 100644 --- a/deps/v8/third_party/ittapi/src/ittnotify/disable_warnings.h +++ b/deps/v8/third_party/ittapi/src/ittnotify/disable_warnings.h @@ -1,60 +1,8 @@ -/* - This file is provided under a dual BSD/GPLv2 license. When using or - redistributing this file, you may do so under either license. +/* + Copyright (C) 2005-2019 Intel Corporation - 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. - */ + SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +*/ #include "ittnotify_config.h" diff --git a/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_config.h b/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_config.h index 36e7f5d6e4b3c0..cb289f79eb25b4 100644 --- a/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_config.h +++ b/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_config.h @@ -1,60 +1,8 @@ -/* - 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 (C) 2005-2019 Intel Corporation + + SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +*/ #ifndef _ITTNOTIFY_CONFIG_H_ #define _ITTNOTIFY_CONFIG_H_ @@ -162,7 +110,12 @@ #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 */ /* @@ -196,6 +149,10 @@ # define ITT_ARCH_PPC64 5 #endif /* ITT_ARCH_PPC64 */ +#ifndef ITT_ARCH_ARM64 +# define ITT_ARCH_ARM64 6 +#endif /* ITT_ARCH_ARM64 */ + #ifndef ITT_ARCH # if defined _M_IX86 || defined __i386__ # define ITT_ARCH ITT_ARCH_IA32 @@ -205,6 +162,8 @@ # define ITT_ARCH ITT_ARCH_IA64 # elif defined _M_ARM || defined __arm__ # define ITT_ARCH ITT_ARCH_ARM +# elif defined __aarch64__ +# define ITT_ARCH ITT_ARCH_ARM64 # elif defined __powerpc64__ # define ITT_ARCH ITT_ARCH_PPC64 # endif @@ -236,7 +195,7 @@ #define API_VERSION_BUILD 20180723 #ifndef API_VERSION_NUM -#define API_VERSION_NUM 0.0.0 +#define API_VERSION_NUM 3.18.13 #endif /* API_VERSION_NUM */ #define API_VERSION "ITT-API-Version " ITT_TO_STR(API_VERSION_NUM) \ @@ -363,12 +322,12 @@ ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend) { long result; __asm__ __volatile__("lock\nxadd %0,%1" - : "=r"(result),"=m"(*(int*)ptr) - : "0"(addend), "m"(*(int*)ptr) + : "=r"(result),"=m"(*(volatile int*)ptr) + : "0"(addend), "m"(*(volatile int*)ptr) : "memory"); return result; } -#elif ITT_ARCH==ITT_ARCH_ARM || ITT_ARCH==ITT_ARCH_PPC64 +#else #define __TBB_machine_fetchadd4(addr, val) __sync_fetch_and_add(addr, val) #endif /* ITT_ARCH==ITT_ARCH_IA64 */ #ifndef ITT_SIMPLE_INIT diff --git a/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_static.c b/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_static.c index 6492ac11071f75..7ada72af62793b 100644 --- a/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_static.c +++ b/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_static.c @@ -1,65 +1,15 @@ -/* - 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 (C) 2005-2019 Intel Corporation + + SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +*/ #include "ittnotify_config.h" #if ITT_PLATFORM==ITT_PLATFORM_WIN +#if !defined(PATH_MAX) #define PATH_MAX 512 +#endif #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ #include #include @@ -81,6 +31,44 @@ static const char api_version[] = API_VERSION "\0\n@(#) $Revision$\n"; #define _N_(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) +#ifndef HAS_CPP_ATTR +#if defined(__cplusplus) && defined(__has_cpp_attribute) +#define HAS_CPP_ATTR(X) __has_cpp_attribute(X) +#else +#define HAS_CPP_ATTR(X) 0 +#endif +#endif + +#ifndef HAS_C_ATTR +#if defined(__STDC__) && defined(__has_c_attribute) +#define HAS_C_ATTR(X) __has_c_attribute(X) +#else +#define HAS_C_ATTR(X) 0 +#endif +#endif + +#ifndef HAS_GNU_ATTR +#if defined(__has_attribute) +#define HAS_GNU_ATTR(X) __has_attribute(X) +#else +#define HAS_GNU_ATTR(X) 0 +#endif +#endif + +#ifndef ITT_ATTRIBUTE_FALLTHROUGH +#if HAS_CPP_ATTR(fallthrough) || HAS_C_ATTR(fallthrough) +#define ITT_ATTRIBUTE_FALLTHROUGH [[fallthrough]] +#elif HAS_CPP_ATTR(gnu::fallthrough) +#define ITT_ATTRIBUTE_FALLTHROUGH [[gnu::fallthrough]] +#elif HAS_CPP_ATTR(clang::fallthrough) +#define ITT_ATTRIBUTE_FALLTHROUGH [[clang::fallthrough]] +#elif HAS_GNU_ATTR(fallthrough) +#define ITT_ATTRIBUTE_FALLTHROUGH __attribute__((fallthrough)) +#else +#define ITT_ATTRIBUTE_FALLTHROUGH +#endif +#endif + #if ITT_OS==ITT_OS_WIN static const char* ittnotify_lib_name = "libittnotify.dll"; #elif ITT_OS==ITT_OS_LINUX || ITT_OS==ITT_OS_FREEBSD @@ -154,8 +142,6 @@ static const char* ittnotify_lib_name = "libittnotify.dylib"; #define ITT_MODULE_OBJECT_VERSION 1 -const int _N_(err) = 0; - typedef int (__itt_init_ittlib_t)(const char*, __itt_group_id); /* this define used to control initialization function name. */ @@ -296,6 +282,7 @@ __itt_global _N_(_ittapi_global) = { typedef void (__itt_api_init_t)(__itt_global*, __itt_group_id); typedef void (__itt_api_fini_t)(__itt_global*); +static __itt_domain dummy_domain; /* ========================================================================= */ #ifdef ITT_NOTIFY_EXT_REPORT @@ -344,6 +331,11 @@ static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW),_init))( __itt_mutex_unlock(&_N_(_ittapi_global).mutex); return ITTNOTIFY_NAME(domain_createW)(name); } + else + { + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); + return &dummy_domain; + } } for (h_tail = NULL, h = _N_(_ittapi_global).domain_list; h != NULL; h_tail = h, h = h->next) { @@ -385,6 +377,15 @@ static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init))(c return ITTNOTIFY_NAME(domain_create)(name); } #endif + else + { +#if ITT_PLATFORM==ITT_PLATFORM_WIN + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); +#else + if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex); +#endif + return &dummy_domain; + } } for (h_tail = NULL, h = _N_(_ittapi_global).domain_list; h != NULL; h_tail = h, h = h->next) { @@ -448,12 +449,17 @@ static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_cre __itt_mutex_unlock(&_N_(_ittapi_global).mutex); return ITTNOTIFY_NAME(string_handle_createW)(name); } + else + { + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); + return NULL; + } } for (h_tail = NULL, h = _N_(_ittapi_global).string_list; h != NULL; h_tail = h, h = h->next) { if (h->strW != NULL && !wcscmp(h->strW, name)) break; } - if (h == NULL) + if (h == NULL) { NEW_STRING_HANDLE_W(&_N_(_ittapi_global),h,h_tail,name); } @@ -489,6 +495,15 @@ static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_cre return ITTNOTIFY_NAME(string_handle_create)(name); } #endif + else + { +#if ITT_PLATFORM==ITT_PLATFORM_WIN + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); +#else + if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex); +#endif + return NULL; + } } for (h_tail = NULL, h = _N_(_ittapi_global).string_list; h != NULL; h_tail = h, h = h->next) { @@ -521,6 +536,11 @@ static __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_createW),_init)) __itt_mutex_unlock(&_N_(_ittapi_global).mutex); return ITTNOTIFY_NAME(counter_createW)(name, domain); } + else + { + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); + return NULL; + } } for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next) { @@ -565,6 +585,15 @@ static __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create),_init))( return ITTNOTIFY_NAME(counter_create)(name, domain); } #endif + else + { +#if ITT_PLATFORM==ITT_PLATFORM_WIN + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); +#else + if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex); +#endif + return NULL; + } } for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next) { @@ -597,6 +626,11 @@ static __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typedW),_ __itt_mutex_unlock(&_N_(_ittapi_global).mutex); return ITTNOTIFY_NAME(counter_create_typedW)(name, domain, type); } + else + { + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); + return NULL; + } } for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next) { @@ -640,6 +674,15 @@ static __itt_counter ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(counter_create_typed),_i return ITTNOTIFY_NAME(counter_create_typed)(name, domain, type); } #endif + else + { +#if ITT_PLATFORM==ITT_PLATFORM_WIN + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); +#else + if (PTHREAD_SYMBOLS) __itt_mutex_unlock(&_N_(_ittapi_global).mutex); +#endif + return NULL; + } } for (h_tail = NULL, h = _N_(_ittapi_global).counter_list; h != NULL; h_tail = h, h = h->next) { @@ -834,7 +877,7 @@ static const char* __itt_fsplit(const char* s, const char* sep, const char** out /* This function return value of env variable that placed into static buffer. * !!! The same static buffer is used for subsequent calls. !!! - * This was done to aviod dynamic allocation for few calls. + * This was done to avoid dynamic allocation for few calls. * Actually we need this function only four times. */ static const char* __itt_get_env_var(const char* name) @@ -858,7 +901,7 @@ static const char* __itt_get_env_var(const char* name) } else { - /* If environment variable is empty, GetEnvirornmentVariables() + /* If environment variable is empty, GetEnvironmentVariables() * returns zero (number of characters (not including terminating null), * and GetLastError() returns ERROR_SUCCESS. */ DWORD err = GetLastError(); @@ -1009,11 +1052,11 @@ static const char* __itt_get_lib_name(void) } /* Avoid clashes with std::min, reported by tbb team */ -#define __itt_min(a,b) (a) < (b) ? (a) : (b) +#define __itt_min(a,b) ((a) < (b) ? (a) : (b)) static __itt_group_id __itt_get_groups(void) { - register int i; + int i; __itt_group_id res = __itt_group_none; const char* var_name = "INTEL_ITTNOTIFY_GROUPS"; const char* group_str = __itt_get_env_var(var_name); @@ -1083,7 +1126,7 @@ static void __itt_reinit_all_pointers(void) static void __itt_nullify_all_pointers(void) { - register int i; + int i; /* Nulify all pointers except domain_create, string_handle_create and counter_create */ for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++) *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func; @@ -1134,7 +1177,7 @@ ITT_EXTERN_C void _N_(fini_ittlib)(void) ITT_EXTERN_C int _N_(init_ittlib)(const char* lib_name, __itt_group_id init_groups) { - register int i; + int i; __itt_group_id groups; #ifdef ITT_COMPLETE_GROUP __itt_group_id zero_group = __itt_group_none; @@ -1166,9 +1209,11 @@ ITT_EXTERN_C int _N_(init_ittlib)(const char* lib_name, __itt_group_id init_grou __itt_api_init_t* __itt_api_init_ptr; int lib_version = __itt_lib_version(_N_(_ittapi_global).lib); - switch (lib_version) { + switch (lib_version) + { case 0: groups = __itt_group_legacy; + ITT_ATTRIBUTE_FALLTHROUGH; case 1: /* Fill all pointers from dynamic library */ for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++) diff --git a/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_static.h b/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_static.h index 222c076cf2351a..2186eca35f1870 100644 --- a/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_static.h +++ b/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_static.h @@ -1,60 +1,8 @@ -/* - 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 (C) 2005-2019 Intel Corporation + + SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +*/ #include "ittnotify_config.h" @@ -81,8 +29,8 @@ ITT_STUB(ITTAPI, __itt_domain*, domain_createW, (const wchar_t *name), (ITT_FORM ITT_STUB(ITTAPI, __itt_domain*, domain_create, (const char *name), (ITT_FORMAT name), domain_create, __itt_group_structure, "\"%s\"") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -ITT_STUBV(ITTAPI, void, module_load_with_sections, (__itt_module_object* module_obj), (ITT_FORMAT module_obj), module_load_with_sections, __itt_group_none, "%p") -ITT_STUBV(ITTAPI, void, module_unload_with_sections, (__itt_module_object* module_obj), (ITT_FORMAT module_obj), module_unload_with_sections, __itt_group_none, "%p") +ITT_STUBV(ITTAPI, void, module_load_with_sections, (__itt_module_object* module_obj), (ITT_FORMAT module_obj), module_load_with_sections, __itt_group_module, "%p") +ITT_STUBV(ITTAPI, void, module_unload_with_sections, (__itt_module_object* module_obj), (ITT_FORMAT module_obj), module_unload_with_sections, __itt_group_module, "%p") #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createA, (const char *name), (ITT_FORMAT name), string_handle_createA, __itt_group_structure, "\"%s\"") diff --git a/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_types.h b/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_types.h index b3fb328f7dac02..7346c8032f626f 100644 --- a/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_types.h +++ b/deps/v8/third_party/ittapi/src/ittnotify/ittnotify_types.h @@ -1,60 +1,8 @@ -/* - This file is provided under a dual BSD/GPLv2 license. When using or - redistributing this file, you may do so under either license. +/* + Copyright (C) 2005-2019 Intel Corporation - 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. - */ + SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +*/ #ifndef _ITTNOTIFY_TYPES_H_ #define _ITTNOTIFY_TYPES_H_ diff --git a/deps/v8/third_party/ittapi/src/ittnotify/ittptmark32.S b/deps/v8/third_party/ittapi/src/ittnotify/ittptmark32.S new file mode 100644 index 00000000000000..7568bc8a64a459 --- /dev/null +++ b/deps/v8/third_party/ittapi/src/ittnotify/ittptmark32.S @@ -0,0 +1,764 @@ +/* + 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) 2017-2020 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) 2017-2020 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. + */ + + +// ///////////////////////////////////////////////////////////////////////// +////// 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 diff --git a/deps/v8/third_party/ittapi/src/ittnotify/ittptmark32.asm b/deps/v8/third_party/ittapi/src/ittnotify/ittptmark32.asm new file mode 100644 index 00000000000000..5fde394e9e174f --- /dev/null +++ b/deps/v8/third_party/ittapi/src/ittnotify/ittptmark32.asm @@ -0,0 +1,255 @@ +COMMENT @ + + 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) 2017-2020 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) 2017-2020 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. + +@ + +;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; ;;; 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 diff --git a/deps/v8/third_party/ittapi/src/ittnotify/ittptmark64.S b/deps/v8/third_party/ittapi/src/ittnotify/ittptmark64.S new file mode 100644 index 00000000000000..25b2058d57b138 --- /dev/null +++ b/deps/v8/third_party/ittapi/src/ittnotify/ittptmark64.S @@ -0,0 +1,766 @@ +/* + 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) 2017-2020 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) 2017-2020 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. + */ + +// ///////////////////////////////////////////////////////////////////////// +////// 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: +__itt_pt_mark_int: + and $0xff, %rdi + call __itt_pt_mark_pic +__itt_pt_mark_pic: + popq %rax + lea (__itt_pt_mark_call_table - __itt_pt_mark_pic) (%rax,%rdi,4), %rdi + jmp *%rdi + + .long 0, 1, 2, 3 // GUID + .long 0xfadefade + +__itt_pt_mark_call_table: + retq + retq $0x0 + retq + retq $0x1 + retq + retq $0x2 + retq + retq $0x3 + retq + retq $0x4 + retq + retq $0x5 + retq + retq $0x6 + retq + retq $0x7 + retq + retq $0x8 + retq + retq $0x9 + retq + retq $0xa + retq + retq $0xb + retq + retq $0xc + retq + retq $0xd + retq + retq $0xe + retq + retq $0xf + + retq + retq $0x10 + retq + retq $0x11 + retq + retq $0x12 + retq + retq $0x13 + retq + retq $0x14 + retq + retq $0x15 + retq + retq $0x16 + retq + retq $0x17 + retq + retq $0x18 + retq + retq $0x19 + retq + retq $0x1a + retq + retq $0x1b + retq + retq $0x1c + retq + retq $0x1d + retq + retq $0x1e + retq + retq $0x1f + + retq + retq $0x20 + retq + retq $0x21 + retq + retq $0x22 + retq + retq $0x23 + retq + retq $0x24 + retq + retq $0x25 + retq + retq $0x26 + retq + retq $0x27 + retq + retq $0x28 + retq + retq $0x29 + retq + retq $0x2a + retq + retq $0x2b + retq + retq $0x2c + retq + retq $0x2d + retq + retq $0x2e + retq + retq $0x2f + + retq + retq $0x30 + retq + retq $0x31 + retq + retq $0x32 + retq + retq $0x33 + retq + retq $0x34 + retq + retq $0x35 + retq + retq $0x36 + retq + retq $0x37 + retq + retq $0x38 + retq + retq $0x39 + retq + retq $0x3a + retq + retq $0x3b + retq + retq $0x3c + retq + retq $0x3d + retq + retq $0x3e + retq + retq $0x3f + + retq + retq $0x40 + retq + retq $0x41 + retq + retq $0x42 + retq + retq $0x43 + retq + retq $0x44 + retq + retq $0x45 + retq + retq $0x46 + retq + retq $0x47 + retq + retq $0x48 + retq + retq $0x49 + retq + retq $0x4a + retq + retq $0x4b + retq + retq $0x4c + retq + retq $0x4d + retq + retq $0x4e + retq + retq $0x4f + + retq + retq $0x50 + retq + retq $0x51 + retq + retq $0x52 + retq + retq $0x53 + retq + retq $0x54 + retq + retq $0x55 + retq + retq $0x56 + retq + retq $0x57 + retq + retq $0x58 + retq + retq $0x59 + retq + retq $0x5a + retq + retq $0x5b + retq + retq $0x5c + retq + retq $0x5d + retq + retq $0x5e + retq + retq $0x5f + + retq + retq $0x60 + retq + retq $0x61 + retq + retq $0x62 + retq + retq $0x63 + retq + retq $0x64 + retq + retq $0x65 + retq + retq $0x66 + retq + retq $0x67 + retq + retq $0x68 + retq + retq $0x69 + retq + retq $0x6a + retq + retq $0x6b + retq + retq $0x6c + retq + retq $0x6d + retq + retq $0x6e + retq + retq $0x6f + + retq + retq $0x70 + retq + retq $0x71 + retq + retq $0x72 + retq + retq $0x73 + retq + retq $0x74 + retq + retq $0x75 + retq + retq $0x76 + retq + retq $0x77 + retq + retq $0x78 + retq + retq $0x79 + retq + retq $0x7a + retq + retq $0x7b + retq + retq $0x7c + retq + retq $0x7d + retq + retq $0x7e + retq + retq $0x7f + + retq + retq $0x80 + retq + retq $0x81 + retq + retq $0x82 + retq + retq $0x83 + retq + retq $0x84 + retq + retq $0x85 + retq + retq $0x86 + retq + retq $0x87 + retq + retq $0x88 + retq + retq $0x89 + retq + retq $0x8a + retq + retq $0x8b + retq + retq $0x8c + retq + retq $0x8d + retq + retq $0x8e + retq + retq $0x8f + + retq + retq $0x90 + retq + retq $0x91 + retq + retq $0x92 + retq + retq $0x93 + retq + retq $0x94 + retq + retq $0x95 + retq + retq $0x96 + retq + retq $0x97 + retq + retq $0x98 + retq + retq $0x99 + retq + retq $0x9a + retq + retq $0x9b + retq + retq $0x9c + retq + retq $0x9d + retq + retq $0x9e + retq + retq $0x9f + + retq + retq $0xa0 + retq + retq $0xa1 + retq + retq $0xa2 + retq + retq $0xa3 + retq + retq $0xa4 + retq + retq $0xa5 + retq + retq $0xa6 + retq + retq $0xa7 + retq + retq $0xa8 + retq + retq $0xa9 + retq + retq $0xaa + retq + retq $0xab + retq + retq $0xac + retq + retq $0xad + retq + retq $0xae + retq + retq $0xaf + + retq + retq $0xb0 + retq + retq $0xb1 + retq + retq $0xb2 + retq + retq $0xb3 + retq + retq $0xb4 + retq + retq $0xb5 + retq + retq $0xb6 + retq + retq $0xb7 + retq + retq $0xb8 + retq + retq $0xb9 + retq + retq $0xba + retq + retq $0xbb + retq + retq $0xbc + retq + retq $0xbd + retq + retq $0xbe + retq + retq $0xbf + + retq + retq $0xc0 + retq + retq $0xc1 + retq + retq $0xc2 + retq + retq $0xc3 + retq + retq $0xc4 + retq + retq $0xc5 + retq + retq $0xc6 + retq + retq $0xc7 + retq + retq $0xc8 + retq + retq $0xc9 + retq + retq $0xca + retq + retq $0xcb + retq + retq $0xcc + retq + retq $0xcd + retq + retq $0xce + retq + retq $0xcf + + retq + retq $0xd0 + retq + retq $0xd1 + retq + retq $0xd2 + retq + retq $0xd3 + retq + retq $0xd4 + retq + retq $0xd5 + retq + retq $0xd6 + retq + retq $0xd7 + retq + retq $0xd8 + retq + retq $0xd9 + retq + retq $0xda + retq + retq $0xdb + retq + retq $0xdc + retq + retq $0xdd + retq + retq $0xde + retq + retq $0xdf + + retq + retq $0xe0 + retq + retq $0xe1 + retq + retq $0xe2 + retq + retq $0xe3 + retq + retq $0xe4 + retq + retq $0xe5 + retq + retq $0xe6 + retq + retq $0xe7 + retq + retq $0xe8 + retq + retq $0xe9 + retq + retq $0xea + retq + retq $0xeb + retq + retq $0xec + retq + retq $0xed + retq + retq $0xee + retq + retq $0xef + + retq + retq $0xf0 + retq + retq $0xf1 + retq + retq $0xf2 + retq + retq $0xf3 + retq + retq $0xf4 + retq + retq $0xf5 + retq + retq $0xf6 + retq + retq $0xf7 + retq + retq $0xf8 + retq + retq $0xf9 + retq + retq $0xfa + retq + retq $0xfb + retq + retq $0xfc + retq + retq $0xfd + retq + retq $0xfe + retq + retq $0xff + + .align 16 + +__itt_pt_byte: +__itt_pt_byte_int: + + and $0xff, %rdi + call __itt_pt_byte_pic +__itt_pt_byte_pic: + popq %rcx + lea (__itt_pt_byte_call_table - __itt_pt_byte_pic) (%rcx,%rdi,1), %rdi + jmp *%rdi + + .align 4 + + .long 0, 1, 2, 3 // GUID + + .long 0xfadedeaf + +__itt_pt_byte_call_table: + + .fill 256,1,0xc3 + + .align 16 + +__itt_pt_event: +__itt_pt_event_int: + + pushq %rcx + mov %rdi,%rcx + rdpmc + + xor %rdi, %rdi + mov %al, %dil + call __itt_pt_byte_int + shr $8, %eax + mov %al, %dil + call __itt_pt_byte_int + shr $8, %eax + mov %al, %dil + call __itt_pt_byte_int + shr $8, %eax + mov %al, %dil + call __itt_pt_byte_int + + mov %dl, %dil + call __itt_pt_byte_int + shr $8, %edx + mov %dl, %dil + call __itt_pt_byte_int + shr $8, %edx + mov %dl, %dil + call __itt_pt_byte_int + shr $8, %edx + mov %dl, %dil + call __itt_pt_byte_int + + popq %rcx + ret + + .align 16 + +__itt_pt_mark_event: + + test $1, %rdi + jnz odd + mov %rdi, %rsi + xor %rdi,%rdi + call __itt_pt_event_int + mov %rsi, %rdi + jmp __itt_pt_mark_int + +odd: + call __itt_pt_mark_int + xor %rdi,%rdi + jmp __itt_pt_event_int + + + .align 16 + +__itt_pt_flush: + + call __itt_pt_flush_pic +__itt_pt_flush_pic: + popq %rdx + lea (__itt_pt_mark_flush_1 - __itt_pt_flush_pic) (%rdx), %rax + jmp *%rax + + .align 16 + nop +__itt_pt_mark_flush_1: + lea (__itt_pt_mark_flush_2 - __itt_pt_flush_pic) (%rdx), %rax + jmp *%rax + + .align 16 + nop + nop +__itt_pt_mark_flush_2: + lea (__itt_pt_mark_flush_3 - __itt_pt_flush_pic) (%rdx), %rax + jmp *%rax + + .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: + // rdi == index + // rsi == tmp + // rdx == threshold + mov %rdx, %r8 // r8 = threshold + xor %rdx, %rdx + xor %rax, %rax + test $1, %rdi + jnz mark_end +mark_begin: + mov $((1 << 30) + 1),%rcx + rdpmc + shl $32, %rdx + or %rax, %rdx + mov %rdx, (%rsi) + jmp __itt_pt_mark_int +mark_end: + mov $((1 << 30) + 1),%rcx + rdpmc + shl $32, %rdx + or %rax, %rdx + sub (%rsi), %rdx + cmp %r8, %rdx // threshold + jnc found + jmp __itt_pt_mark_int +found: + call __itt_pt_mark_int + 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 rcx + .byte 0xF3, 0x48, 0x0F, 0xAE, 0xE1 + ret diff --git a/deps/v8/third_party/ittapi/src/ittnotify/ittptmark64.asm b/deps/v8/third_party/ittapi/src/ittnotify/ittptmark64.asm new file mode 100644 index 00000000000000..3ea108d67e9d88 --- /dev/null +++ b/deps/v8/third_party/ittapi/src/ittnotify/ittptmark64.asm @@ -0,0 +1,251 @@ +COMMENT @ + + 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) 2017-2020 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) 2017-2020 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. + +@ + +;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; ;;; Intel Processor Trace Marker Functionality +;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +_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 + + and rcx,0ffh + lea r10,offset __itt_pt_mark_call_table + lea rcx,[r10 + rcx * 4] + jmp rcx + + 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 + + align 10h + +__itt_pt_byte proc + + and rcx,0ffh + lea r10,offset __itt_pt_byte_call_table + add rcx,r10 + jmp rcx + + 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 + + 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 + + ret + +__itt_pt_event endp + + align 10h + +__itt_pt_mark_event proc + + test rcx,1 + jnz odd + mov r8,rcx + xor rcx,rcx + call __itt_pt_event + mov rcx,r8 + jmp __itt_pt_mark + +odd: + call __itt_pt_mark + xor rcx,rcx + jmp __itt_pt_event + +__itt_pt_mark_event endp + + align 10h + +__itt_pt_flush proc + + lea rax,offset __itt_pt_mark_flush_1 + jmp rax + + align 10h + nop +__itt_pt_mark_flush_1: + lea rax,offset __itt_pt_mark_flush_2 + jmp rax + + align 10h + nop + nop +__itt_pt_mark_flush_2: + lea rax,offset __itt_pt_mark_flush_3 + jmp rax + + 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 + mov r9,rcx ;;; index + mov r10,rdx ;;; tmp + xor rdx,rdx + xor rax,rax + test rcx,1 + jnz mark_end +mark_begin: + mov rcx,(1 SHL 30) + 1 + rdpmc + shl rdx,32 + or rdx,rax + mov [r10],rdx + mov rcx,r9 + jmp __itt_pt_mark +mark_end: + mov rcx,(1 SHL 30) + 1 + rdpmc + shl rdx,32 + or rdx,rax + sub rdx,[r10] + cmp rdx,r8 ;;; threshold + mov rcx,r9 + 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 rcx + db 0F3h, 48h, 0Fh, 0AEh, 0E1h + ret + +__itt_pt_write endp + +;;; + +_TEXT ends + end diff --git a/deps/v8/third_party/ittapi/src/ittnotify/jitprofiling.c b/deps/v8/third_party/ittapi/src/ittnotify/jitprofiling.c index 88002e2e1189c1..9c372db2e8d8e6 100644 --- a/deps/v8/third_party/ittapi/src/ittnotify/jitprofiling.c +++ b/deps/v8/third_party/ittapi/src/ittnotify/jitprofiling.c @@ -1,60 +1,8 @@ -/* - 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 (C) 2005-2019 Intel Corporation + + SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +*/ #include "ittnotify_config.h" diff --git a/deps/v8/third_party/ittapi/src/ittnotify_refcol/Makefile b/deps/v8/third_party/ittapi/src/ittnotify_refcol/Makefile new file mode 100644 index 00000000000000..5500c92306b8de --- /dev/null +++ b/deps/v8/third_party/ittapi/src/ittnotify_refcol/Makefile @@ -0,0 +1,14 @@ +INCLUDE_DIR = ../../include/ +SRC_DIR = ../ittnotify/ +SOURCE_NAME = itt_refcol_impl.c +OBJ_NAME = itt_refcol_impl.o +LIB_NAME = libittrefcol.so +CC ?= gcc +CFLAGS = -I$(INCLUDE_DIR) -I$(SRC_DIR) + +build: + $(CC) -fPIC $(CFLAGS) -c $(SOURCE_NAME) + $(CC) -shared -o $(LIB_NAME) $(OBJ_NAME) + +clean: + rm $(OBJ_NAME) $(LIB_NAME) diff --git a/deps/v8/third_party/ittapi/src/ittnotify_refcol/README.md b/deps/v8/third_party/ittapi/src/ittnotify_refcol/README.md new file mode 100644 index 00000000000000..a6180b0536a89f --- /dev/null +++ b/deps/v8/third_party/ittapi/src/ittnotify_refcol/README.md @@ -0,0 +1,26 @@ +This is a reference implementation of the ITT API _dynamic part_ +that performs tracing data from ITT API functions calls to log files. + +To use this solution it is requered to build it like a shared library and add +full library path to the `INTEL_LIBITTNOTIFY64/INTEL_LIBITTNOTIFY32` environment variable: +``` +make +export INTEL_LIBITTNOTIFY64=/libittnotify_refcol.so +``` + +Temp directory is used by default to save log files. +To change log directory use the `INTEL_LIBITTNOTIFY_LOG_DIR` environment variable: +``` +export INTEL_LIBITTNOTIFY_LOG_DIR= +``` + +This implementation adds logging of some of the ITT API functions calls. +Adding logging of the other ITT API functions calls are welcome. +The solution provides 4 functions with different log levels +that takes printf format for logging: +``` +LOG_FUNC_CALL_INFO(const char *msg_format, ...); +LOG_FUNC_CALL_WARN(const char *msg_format, ...); +LOG_FUNC_CALL_ERROR(const char *msg_format, ...); +LOG_FUNC_CALL_FATAL(const char *msg_format, ...); +``` diff --git a/deps/v8/third_party/ittapi/src/ittnotify_refcol/itt_refcol_impl.c b/deps/v8/third_party/ittapi/src/ittnotify_refcol/itt_refcol_impl.c new file mode 100644 index 00000000000000..e463408ee67504 --- /dev/null +++ b/deps/v8/third_party/ittapi/src/ittnotify_refcol/itt_refcol_impl.c @@ -0,0 +1,277 @@ +#include +#include +#include +#include +#include + +#define INTEL_NO_MACRO_BODY +#define INTEL_ITTNOTIFY_API_PRIVATE +#include "ittnotify.h" +#include "ittnotify_config.h" + +#define LOG_BUFFER_MAX_SIZE 256 + +static const char* env_log_dir = "INTEL_LIBITTNOTIFY_LOG_DIR"; +static const char* log_level_str[] = {"INFO", "WARN", "ERROR", "FATAL_ERROR"}; + +enum { + LOG_LVL_INFO, + LOG_LVL_WARN, + LOG_LVL_ERROR, + LOG_LVL_FATAL +}; + +static struct ref_collector_logger { + char* file_name; + uint8_t init_state; +} g_ref_collector_logger = {NULL, 0}; + +char* log_file_name_generate() +{ + time_t time_now = time(NULL); + struct tm* time_info = localtime(&time_now); + char* log_file_name = malloc(sizeof(char) * (LOG_BUFFER_MAX_SIZE/2)); + + sprintf(log_file_name,"libittnotify_refcol_%d%d%d%d%d%d.log", + time_info->tm_year+1900, time_info->tm_mon+1, time_info->tm_mday, + time_info->tm_hour, time_info->tm_min, time_info->tm_sec); + + return log_file_name; +} + +void ref_col_init() +{ + if (!g_ref_collector_logger.init_state) + { + static char file_name_buffer[LOG_BUFFER_MAX_SIZE*2]; + char* log_dir = getenv(env_log_dir); + char* log_file = log_file_name_generate(); + + if (log_dir != NULL) + { + #ifdef _WIN32 + sprintf(file_name_buffer,"%s\\%s", log_dir, log_file); + #else + sprintf(file_name_buffer,"%s/%s", log_dir, log_file); + #endif + } + else + { + #ifdef _WIN32 + char* temp_dir = getenv("TEMP"); + if (temp_dir != NULL) + { + sprintf(file_name_buffer,"%s\\%s", temp_dir, log_file); + } + #else + sprintf(file_name_buffer,"/tmp/%s", log_file); + #endif + } + + g_ref_collector_logger.file_name = file_name_buffer; + g_ref_collector_logger.init_state = 1; + } +} + +static void fill_func_ptr_per_lib(__itt_global* p) +{ + __itt_api_info* api_list = (__itt_api_info*)p->api_list_ptr; + + for (int i = 0; api_list[i].name != NULL; i++) + { + *(api_list[i].func_ptr) = (void*)__itt_get_proc(p->lib, api_list[i].name); + if (*(api_list[i].func_ptr) == NULL) + { + *(api_list[i].func_ptr) = api_list[i].null_func; + } + } +} + +ITT_EXTERN_C void ITTAPI __itt_api_init(__itt_global* p, __itt_group_id init_groups) +{ + if (p != NULL) + { + fill_func_ptr_per_lib(p); + ref_col_init(); + } + else + { + printf("ERROR: Failed to initialize dynamic library\n"); + } +} + +void log_func_call(uint8_t log_level, const char* function_name, const char* message_format, ...) +{ + if (g_ref_collector_logger.init_state) + { + FILE * pLogFile = NULL; + char log_buffer[LOG_BUFFER_MAX_SIZE]; + uint32_t result_len = 0; + va_list message_args; + + result_len += sprintf(log_buffer, "[%s] %s(...) - ", log_level_str[log_level] ,function_name); + va_start(message_args, message_format); + vsnprintf(log_buffer + result_len, LOG_BUFFER_MAX_SIZE - result_len, message_format, message_args); + + pLogFile = fopen(g_ref_collector_logger.file_name, "a"); + if (!pLogFile) + { + printf("ERROR: Cannot open file: %s\n", g_ref_collector_logger.file_name); + return; + } + fprintf(pLogFile, "%s\n", log_buffer); + fclose(pLogFile); + } + else + { + return; + } +} + +#define LOG_FUNC_CALL_INFO(...) log_func_call(LOG_LVL_INFO, __FUNCTION__, __VA_ARGS__) +#define LOG_FUNC_CALL_WARN(...) log_func_call(LOG_LVL_WARN, __FUNCTION__, __VA_ARGS__) +#define LOG_FUNC_CALL_ERROR(...) log_func_call(LOG_LVL_ERROR, __FUNCTION__, __VA_ARGS__) +#define LOG_FUNC_CALL_FATAL(...) log_func_call(LOG_LVL_FATAL, __FUNCTION__, __VA_ARGS__) + +/* ------------------------------------------------------------------------------ */ +/* The code below is a reference implementation of the ITT API dynamic collector. */ +/* This implementation is designed to log ITTAPI functions calls.*/ +/* ------------------------------------------------------------------------------ */ + +char* get_metadata_elements(size_t size, __itt_metadata_type type, void* metadata) +{ + char* metadata_str = malloc(sizeof(char) * LOG_BUFFER_MAX_SIZE); + *metadata_str = '\0'; + + switch (type) + { + case __itt_metadata_u64: + for (uint16_t i = 0; i < size; i++) + sprintf(metadata_str, "%s%llu;", metadata_str, ((uint64_t*)metadata)[i]); + break; + case __itt_metadata_s64: + for (uint16_t i = 0; i < size; i++) + sprintf(metadata_str, "%s%lld;", metadata_str, ((int64_t*)metadata)[i]); + break; + case __itt_metadata_u32: + for (uint16_t i = 0; i < size; i++) + sprintf(metadata_str, "%s%lu;", metadata_str, ((uint32_t*)metadata)[i]); + break; + case __itt_metadata_s32: + for (uint16_t i = 0; i < size; i++) + sprintf(metadata_str, "%s%ld;", metadata_str, ((int32_t*)metadata)[i]); + break; + case __itt_metadata_u16: + for (uint16_t i = 0; i < size; i++) + sprintf(metadata_str, "%s%u;", metadata_str, ((uint16_t*)metadata)[i]); + break; + case __itt_metadata_s16: + for (uint16_t i = 0; i < size; i++) + sprintf(metadata_str, "%s%d;", metadata_str, ((int16_t*)metadata)[i]); + break; + case __itt_metadata_float: + for (uint16_t i = 0; i < size; i++) + sprintf(metadata_str, "%s%f;", metadata_str, ((float*)metadata)[i]); + break; + case __itt_metadata_double: + for (uint16_t i = 0; i < size; i++) + sprintf(metadata_str, "%s%lf;", metadata_str, ((double*)metadata)[i]); + break; + default: + printf("ERROR: Unknow metadata type\n"); + } + + return metadata_str; +} + +ITT_EXTERN_C void ITTAPI __itt_pause(void) +{ + LOG_FUNC_CALL_INFO("function call"); +} + +ITT_EXTERN_C void ITTAPI __itt_resume(void) +{ + LOG_FUNC_CALL_INFO("function call"); +} + +ITT_EXTERN_C void ITTAPI __itt_detach(void) +{ + LOG_FUNC_CALL_INFO("function call"); +} + +ITT_EXTERN_C void ITTAPI __itt_frame_begin_v3(const __itt_domain *domain, __itt_id *id) +{ + if (domain != NULL) + { + LOG_FUNC_CALL_INFO("functions args: domain_name=%s", domain->nameA); + } + else + { + LOG_FUNC_CALL_WARN("Incorrect function call"); + } +} + +ITT_EXTERN_C void ITTAPI __itt_frame_end_v3(const __itt_domain *domain, __itt_id *id) +{ + if (domain != NULL) + { + LOG_FUNC_CALL_INFO("functions args: domain_name=%s", domain->nameA); + } + else + { + LOG_FUNC_CALL_WARN("Incorrect function call"); + } +} + +ITT_EXTERN_C void ITTAPI __itt_frame_submit_v3(const __itt_domain *domain, __itt_id *id, + __itt_timestamp begin, __itt_timestamp end) +{ + if (domain != NULL) + { + LOG_FUNC_CALL_INFO("functions args: domain_name=%s, time_begin=%lu, time_end=%llu", + domain->nameA, (uint64_t*)id, begin, end); + } + else + { + LOG_FUNC_CALL_WARN("Incorrect function call"); + } +} + +ITT_EXTERN_C void ITTAPI __itt_task_begin( + const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name) +{ + if (domain != NULL && name != NULL) + { + LOG_FUNC_CALL_INFO("functions args: domain_name=%s handle_name=%s", domain->nameA, name->strA); + } + else + { + LOG_FUNC_CALL_WARN("Incorrect function call"); + } +} + +ITT_EXTERN_C void ITTAPI __itt_task_end(const __itt_domain *domain) +{ + if (domain != NULL) + { + LOG_FUNC_CALL_INFO("functions args: domain_name=%s", domain->nameA); + } + else + { + LOG_FUNC_CALL_WARN("Incorrect function call"); + } +} + +ITT_EXTERN_C void __itt_metadata_add(const __itt_domain *domain, __itt_id id, + __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data) +{ + if (domain != NULL && count != 0) + { + LOG_FUNC_CALL_INFO("functions args: domain_name=%s metadata_size=%lu metadata[]=%s", + domain->nameA, count, get_metadata_elements(count, type, data)); + } + else + { + LOG_FUNC_CALL_WARN("Incorrect function call"); + } +}