v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
etw-jit-metadata-win.cc
Go to the documentation of this file.
1// Copyright 2024 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
6
7namespace v8 {
8namespace internal {
9namespace ETWJITInterface {
10
11void SetMetaDescriptors(EVENT_DATA_DESCRIPTOR* data_descriptor,
12 UINT16 const UNALIGNED* traits, const void* metadata,
13 size_t size) {
14 // The first descriptor is the provider traits (just the name currently)
15 uint16_t traits_size = *reinterpret_cast<const uint16_t*>(traits);
16 EventDataDescCreate(data_descriptor, traits, traits_size);
17 data_descriptor->Type = EVENT_DATA_DESCRIPTOR_TYPE_PROVIDER_METADATA;
18 ++data_descriptor;
19
20 // The second descriptor contains the data to describe the field layout
21 EventDataDescCreate(data_descriptor, metadata, static_cast<ULONG>(size));
22 data_descriptor->Type = EVENT_DATA_DESCRIPTOR_TYPE_EVENT_METADATA;
23}
24
25} // namespace ETWJITInterface
26} // namespace internal
27} // namespace v8
void SetMetaDescriptors(EVENT_DATA_DESCRIPTOR *data_descriptor, UINT16 const UNALIGNED *traits, const void *metadata, size_t size)