Skip to content

Commit fb008a2

Browse files
Shi Leidanielleadams
Shi Lei
authored andcommittedJan 3, 2023
build,deps,src: fix Intel VTune profiling support
PR-URL: #45248 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent c5630e2 commit fb008a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+16636
-2
lines changed
 

‎LICENSE

+12
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,18 @@ The externally maintained libraries used by Node.js are:
107107
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
108108
"""
109109

110+
- ittapi, located at deps/v8/third_party/ittapi, is licensed as follows:
111+
"""
112+
Copyright (c) 2019 Intel Corporation. All rights reserved.
113+
114+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
115+
116+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
117+
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.
118+
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.
119+
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.
120+
"""
121+
110122
- ICU, located at deps/icu-small, is licensed as follows:
111123
"""
112124
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE

‎configure.py

+16
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@
160160
help="Generate an executable with libgcc and libstdc++ libraries. This "
161161
"will not work on OSX when using the default compilation environment")
162162

163+
parser.add_argument("--enable-vtune-profiling",
164+
action="store_true",
165+
dest="enable_vtune_profiling",
166+
help="Enable profiling support for Intel VTune profiler to profile "
167+
"JavaScript code executed in Node.js. This feature is only available "
168+
"for x32, x86, and x64 architectures.")
169+
163170
parser.add_argument("--enable-pgo-generate",
164171
action="store_true",
165172
dest="enable_pgo_generate",
@@ -1309,6 +1316,15 @@ def configure_node(o):
13091316
if flavor == 'aix':
13101317
o['variables']['node_target_type'] = 'static_library'
13111318

1319+
if target_arch in ('x86', 'x64', 'ia32', 'x32'):
1320+
o['variables']['node_enable_v8_vtunejit'] = b(options.enable_vtune_profiling)
1321+
elif options.enable_vtune_profiling:
1322+
raise Exception(
1323+
'The VTune profiler for JavaScript is only supported on x32, x86, and x64 '
1324+
'architectures.')
1325+
else:
1326+
o['variables']['node_enable_v8_vtunejit'] = 'false'
1327+
13121328
if flavor != 'linux' and (options.enable_pgo_generate or options.enable_pgo_use):
13131329
raise Exception(
13141330
'The pgo option is supported only on linux.')

0 commit comments

Comments
 (0)
Please sign in to comment.