Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,13 @@ jobs:
include:
- runner: ubuntu-24.04
system: x86_64-linux
perfetto: true
- runner: ubuntu-24.04-arm
system: aarch64-linux
- runner: macos-15-intel
system: x86_64-darwin
- runner: macos-latest
system: aarch64-darwin
name: '${{ matrix.system }}: with shared libraries${{ matrix.perfetto && '' and perfetto'' || '''' }}'
name: '${{ matrix.system }}: with shared libraries'
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -120,7 +119,6 @@ jobs:
--keep SCCACHE_GHA_ENABLED --keep SCCACHE_GHA_RW_MODE \
--keep ACTIONS_CACHE_SERVICE_V2 --keep ACTIONS_RESULTS_URL --keep ACTIONS_RUNTIME_TOKEN \
--arg useSeparateDerivationForV8 true \
--arg withPerfetto ${{ matrix.perfetto || false }} \
--arg loadJSBuiltinsDynamically false \
--arg ccache '(import <nixpkgs> {}).sccache' \
--arg devTools '[]' \
Expand All @@ -140,7 +138,6 @@ jobs:
-I nixpkgs=./tools/nix/pkgs.nix \
--pure --keep SCCACHE_LOCAL_RW_MODE \
--arg useSeparateDerivationForV8 true \
--arg withPerfetto ${{ matrix.perfetto || false }} \
--arg loadJSBuiltinsDynamically false \
--arg ccache '(import <nixpkgs> {}).sccache' \
--arg devTools '[]' \
Expand Down
70 changes: 0 additions & 70 deletions .github/workflows/test-linux-perfetto.yml

This file was deleted.

16 changes: 11 additions & 5 deletions .github/workflows/test-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,24 +149,30 @@ jobs:
include:
- runner: ubuntu-24.04
system: x86_64-linux
# Exercise the trace-event code against a perfetto-enabled V8.
perfetto: true
# built separately in build-aarch64-linux-v8
# - runner: ubuntu-24.04-arm
# system: aarch64-linux
- runner: macos-15-intel
system: x86_64-darwin
- runner: macos-latest
system: aarch64-darwin
name: '${{ matrix.system }}: with shared libraries${{ matrix.perfetto && '' and perfetto'' || '''' }}'
name: '${{ matrix.system }}: with shared libraries'
uses: ./.github/workflows/build-shared.yml
with:
runner: ${{ matrix.runner }}
with-sccache: ${{ github.base_ref == 'main' || github.ref_name == 'main' }}
extra-nix-flags: |
--arg useSeparateDerivationForV8 true \
${{ matrix.perfetto && '--arg withPerfetto true \' || '\' }}
${{ endsWith(matrix.system, '-darwin') && '--arg withAmaro false --arg withLief false --arg withSQLite false --arg withFFI false --arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }}
${{ endsWith(matrix.system, '-darwin') && '\
--arg withAmaro false \
--arg withFFI false \
--arg withLief false \
--arg withPerfetto false \
--arg withSQLite false \
--arg extraConfigFlags ''[
"--without-inspector"
"--without-node-options"
]'' \' || '\' }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand Down
12 changes: 6 additions & 6 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1170,11 +1170,11 @@
default=None,
help='disable the V8 inspector protocol')

parser.add_argument('--with-perfetto',
parser.add_argument('--without-perfetto',
action='store_true',
dest='with_perfetto',
dest='without_perfetto',
default=None,
help='enable perfetto support')
help='disable perfetto support')

parser.add_argument('--shared',
action='store_true',
Expand Down Expand Up @@ -2266,7 +2266,7 @@ def configure_v8(o, configs):
options.v8_disable_temporal_support = True
o['variables']['v8_enable_temporal_support'] = 0 if options.v8_disable_temporal_support else 1
o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0
o['variables']['v8_use_perfetto'] = 1 if options.with_perfetto else 0
o['variables']['v8_use_perfetto'] = 0 if options.without_perfetto else 1
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
o['variables']['force_dynamic_crt'] = 1 if options.shared else 0
Expand Down Expand Up @@ -2390,9 +2390,9 @@ def configure_lief(o):
configure_library('lief', o, pkgname='LIEF')

def configure_perfetto(o):
if not options.with_perfetto:
if options.without_perfetto:
if options.shared_perfetto:
error('--shared-perfetto requires --with-perfetto')
error('--without-perfetto is incompatible with --shared-perfetto')
o['variables']['node_shared_perfetto'] = b(False)
return

Expand Down
8 changes: 8 additions & 0 deletions deps/perfetto/perfetto.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
'sources': [
'<@(perfetto_sdk_sources)',
],
'conditions': [
['OS=="win"', {
'defines': [
'WIN32_LEAN_AND_MEAN',
'NOMINMAX',
],
}],
],
},
]
}
5 changes: 5 additions & 0 deletions node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@
[ 'OS=="linux" and target_arch=="s390x"', {
'cflags': [ '-march=z14' ],
}],
[ 'v8_use_perfetto==1 and node_shared_perfetto=="false"', {
'dependencies': [
'deps/perfetto/perfetto.gyp:perfetto_sdk',
],
}],
[ 'node_enable_d8=="true"', {
'dependencies': [ 'tools/v8_gypfiles/d8.gyp:d8' ],
}],
Expand Down
4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
withFFI ? true,
withSSL ? true,
withTemporal ? false,
withPerfetto ? false,
withPerfetto ? true,
sharedLibDeps ? (
import ./tools/nix/sharedLibDeps.nix {
inherit
Expand Down Expand Up @@ -84,7 +84,7 @@ let
++ pkgs.lib.optional (builtins.hasAttr "highway" sharedLibDeps) "--shared-highway"
++ pkgs.lib.optional (withPerfetto && useSharedPerfetto) "--shared-perfetto"
++ pkgs.lib.optional (withTemporal && useSharedTemporal) "--shared-temporal_capi"
++ pkgs.lib.optional withPerfetto "--with-perfetto";
++ pkgs.lib.optional (!withPerfetto) "--without-perfetto";
in
pkgs.mkShell {
inherit nativeBuildInputs;
Expand Down
2 changes: 1 addition & 1 deletion tools/nix/sharedLibDeps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
withSQLite ? true,
withSSL ? true,
withFFI ? true,
withPerfetto ? false,
withPerfetto ? true,
withTemporal ? false,
}:
{
Expand Down
2 changes: 1 addition & 1 deletion tools/nix/v8.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ let
++ lib.optional (!useSharedAbseil) ../../tools/v8_gypfiles/abseil.gyp
++ lib.optional (!useSharedHighway) ../../tools/v8_gypfiles/highway.gyp
++ lib.optional (
builtins.elem "--with-perfetto" configureFlags
!(builtins.elem "--without-perfetto" configureFlags)
&& !(builtins.elem "--shared-perfetto" configureFlags)
) ../../deps/perfetto
++ lib.optionals (icu != null) [
Expand Down
6 changes: 5 additions & 1 deletion tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,11 @@
}],
['v8_use_perfetto==1', {
'sources!': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_libplatform.*?v8_use_perfetto.*?sources \\-= ")',
'<(V8_ROOT)/src/libplatform/tracing/trace-buffer.cc',
'<(V8_ROOT)/src/libplatform/tracing/trace-buffer.h',
'<(V8_ROOT)/src/libplatform/tracing/trace-writer.cc',
'<(V8_ROOT)/src/libplatform/tracing/trace-writer.h',
'<(V8_ROOT)/src/tracing/trace-event-no-perfetto.h',
],
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_libplatform.*?v8_use_perfetto.*?sources \\+= ")',
Expand Down
Loading