Skip to content

Commit 785a2ea

Browse files
aduh95v8-scoped@luci-project-accounts.iam.gserviceaccount.com
authored andcommitted
[tracing] do not define legacy tracing classes when using Perfetto
Otherwise the Windows build of Node.js fails with `undefined symbol` errors due to the missing destructor. Change-Id: Id0841aed2f0a8f0cfe8889c39150552e31ee5f96 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8580049 Reviewed-by: Yang Guo <[email protected]> Reviewed-by: Chengzhong Wu <[email protected]> Commit-Queue: Chengzhong Wu <[email protected]> Cr-Commit-Position: refs/heads/main@{#110947}
1 parent 50ac9be commit 785a2ea

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎include/libplatform/v8-tracing.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class TraceEventListener;
3535

3636
const int kTraceMaxNumArgs = 2;
3737

38+
#if !defined(V8_USE_PERFETTO)
3839
class V8_PLATFORM_EXPORT TraceObject {
3940
public:
4041
union ArgValue {
@@ -176,6 +177,7 @@ class V8_PLATFORM_EXPORT TraceBuffer {
176177
TraceBuffer(const TraceBuffer&) = delete;
177178
void operator=(const TraceBuffer&) = delete;
178179
};
180+
#endif // !defined(V8_USE_PERFETTO)
179181

180182
// Options determines how the trace buffer stores data.
181183
enum TraceRecordMode {

‎test/benchmarks/cpp/BUILD.gn‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ if (v8_enable_google_benchmark) {
6565
"//:v8",
6666
"//:v8_internal_headers",
6767
"//:v8_libbase",
68+
"//:v8_tracing",
6869
"//third_party/google_benchmark_chrome:google_benchmark",
6970
]
7071
}

‎test/cctest/test-cpu-profiler.cc‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2964,9 +2964,11 @@ TEST(DeoptUntrackedFunction) {
29642964
iprofiler->DeleteProfile(iprofile);
29652965
}
29662966

2967-
using v8::platform::tracing::TraceBuffer;
29682967
using v8::platform::tracing::TraceConfig;
2968+
#if !defined(V8_USE_PERFETTO)
2969+
using v8::platform::tracing::TraceBuffer;
29692970
using v8::platform::tracing::TraceObject;
2971+
#endif // !defined(V8_USE_PERFETTO)
29702972

29712973
namespace {
29722974

0 commit comments

Comments
 (0)