v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
trace-id.h
Go to the documentation of this file.
1// Copyright 2025 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_TRACING_TRACE_ID_H_
6#define V8_TRACING_TRACE_ID_H_
7
9
10namespace v8 {
11namespace tracing {
12V8_INLINE uint64_t TraceId() {
13 static std::atomic<uint64_t> sequence_number(0);
14 return sequence_number.fetch_add(1, std::memory_order_relaxed);
15}
16} // namespace tracing
17} // namespace v8
18
19#endif // V8_TRACING_TRACE_ID_H_
V8_INLINE uint64_t TraceId()
Definition trace-id.h:12
#define V8_INLINE
Definition v8config.h:500