v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::ETWJITInterface Namespace Reference

Classes

class  EtwIsolateCaptureStateMonitor
 
class  EtwIsolateOperations
 
class  IsolateLoadScriptData
 
struct  str_bytes
 
struct  str_bytes< 0 >
 

Typedefs

using IsolateMapType
 
using FilterDataType = std::string
 

Functions

void SetMetaDescriptors (EVENT_DATA_DESCRIPTOR *data_descriptor, UINT16 const UNALIGNED *traits, const void *metadata, size_t size)
 
template<size_t count, typename idx = std::make_index_sequence<count>>
constexpr auto MakeStrBytes (char const (&s)[count])
 
template<std::size_t size1, std::size_t size2>
constexpr auto JoinBytes (const str_bytes< size1 > &str1, const str_bytes< size2 > &str2)
 
template<size_t count>
constexpr auto Field (char const (&s)[count], uint8_t type)
 
constexpr auto Header (size_t size)
 
constexpr auto JoinFields ()
 
template<typename T1 >
constexpr auto JoinFields (T1 field)
 
template<typename T1 , typename T2 , typename... Ts>
constexpr auto JoinFields (T1 field1, T2 field2, Ts... args)
 
template<std::size_t count, typename... Ts>
constexpr auto EventFields (char const (&name)[count], Ts... field_args)
 
constexpr auto EventMetadata (uint16_t id, uint64_t keywords)
 
void SetFieldDescriptors (EVENT_DATA_DESCRIPTOR *data_descriptors)
 
template<typename... Ts>
void SetFieldDescriptors (EVENT_DATA_DESCRIPTOR *data_descriptors, const std::wstring &value, const Ts &... rest)
 
template<typename... Ts>
void SetFieldDescriptors (EVENT_DATA_DESCRIPTOR *data_descriptors, const std::string &value, const Ts &... rest)
 
template<typename... Ts>
void SetFieldDescriptors (EVENT_DATA_DESCRIPTOR *data_descriptors, const char *value, const Ts &... rest)
 
template<typename T , typename... Ts>
void SetFieldDescriptors (EVENT_DATA_DESCRIPTOR *data_descriptors, const T &value, const Ts &... rest)
 
ULONG LogEvent (uint64_t regHandle, const EVENT_DESCRIPTOR *event_descriptor, EVENT_DATA_DESCRIPTOR *data_descriptor, ULONG desc_count)
 
template<typename T , typename... Fs>
void LogEventData (const TraceLoggingHProvider provider, const EVENT_DESCRIPTOR *event_descriptor, T *meta, const Fs &... fields)
 
 V8_DECLARE_TRACELOGGING_PROVIDER (g_v8Provider)
 
 V8_DEFINE_TRACELOGGING_PROVIDER (g_v8Provider)
 
void MaybeSetHandlerNow (Isolate *isolate)
 
Tagged< SharedFunctionInfoGetSharedFunctionInfo (const JitCodeEvent *event)
 
std::wstring GetScriptMethodNameFromEvent (const JitCodeEvent *event)
 
std::wstring GetScriptMethodNameFromSharedFunctionInfo (Tagged< SharedFunctionInfo > sfi)
 
std::wstring GetScriptMethodName (const JitCodeEvent *event)
 
void UpdateETWEnabled (bool enabled, uint32_t options)
 
void WINAPI V8_EXPORT_PRIVATE ETWEnableCallback (LPCGUID, ULONG is_enabled, UCHAR level, ULONGLONG match_any_keyword, ULONGLONG match_all_keyword, PEVENT_FILTER_DESCRIPTOR filter_data, PVOID)
 
void Register ()
 
void Unregister ()
 
void AddIsolate (Isolate *isolate)
 
void RemoveIsolate (Isolate *isolate)
 
void EventHandler (const JitCodeEvent *event)
 

Variables

constexpr auto kCaptureStateTimeout = base::TimeDelta::FromSeconds(10)
 
base::LazyMutex isolates_mutex = LAZY_MUTEX_INITIALIZER
 
base::LazyInstance< IsolateMapType >::type isolate_map
 
base::LazyInstance< FilterDataType >::type etw_filter_payload_glob
 
const uint8_t kManifestFreeChannel = 11
 
const uint8_t kMetaDescriptorsCount = 2
 
constexpr uint32_t kEtwControlDisable = 0
 
constexpr uint32_t kEtwControlEnable = 1
 
constexpr uint32_t kEtwControlCaptureState = 2
 
constexpr uint64_t kJScriptRuntimeKeyword = 1
 
constexpr uint16_t kSourceLoadEventID = 41
 
constexpr uint16_t kMethodLoadEventID = 9
 
constexpr uint16_t kSourceDCStartEventID = 39
 
constexpr uint16_t kMethodDCStartEventID = 5
 
constexpr unsigned char kTraceLevel = TRACE_LEVEL_INFORMATION
 
std::atomic< boolhas_active_etw_tracing_session_or_custom_filter = false
 
constexpr uint32_t kEtwRundown = 0xf0000000
 

Typedef Documentation

◆ FilterDataType

◆ IsolateMapType

Initial value:
std::unordered_map<v8::internal::Isolate*, IsolateLoadScriptData>

Definition at line 87 of file etw-isolate-load-script-data-win.h.

Function Documentation

◆ AddIsolate()

void v8::internal::ETWJITInterface::AddIsolate ( Isolate * isolate)

Definition at line 199 of file etw-jit-win.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ETWEnableCallback()

void WINAPI V8_EXPORT_PRIVATE v8::internal::ETWJITInterface::ETWEnableCallback ( LPCGUID ,
ULONG is_enabled,
UCHAR level,
ULONGLONG match_any_keyword,
ULONGLONG match_all_keyword,
PEVENT_FILTER_DESCRIPTOR filter_data,
PVOID  )

Definition at line 112 of file etw-jit-win.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EventFields()

template<std::size_t count, typename... Ts>
auto v8::internal::ETWJITInterface::EventFields ( char const (&) name[count],
Ts... field_args )
constexpr

Definition at line 133 of file etw-jit-metadata-win.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EventHandler()

void v8::internal::ETWJITInterface::EventHandler ( const JitCodeEvent * event)

Definition at line 207 of file etw-jit-win.cc.

Here is the call graph for this function:

◆ EventMetadata()

auto v8::internal::ETWJITInterface::EventMetadata ( uint16_t id,
uint64_t keywords )
constexpr

Definition at line 142 of file etw-jit-metadata-win.h.

Here is the caller graph for this function:

◆ Field()

template<size_t count>
auto v8::internal::ETWJITInterface::Field ( char const (&) s[count],
uint8_t type )
constexpr

Definition at line 88 of file etw-jit-metadata-win.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetScriptMethodName()

std::wstring v8::internal::ETWJITInterface::GetScriptMethodName ( const JitCodeEvent * event)

Definition at line 95 of file etw-jit-win.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetScriptMethodNameFromEvent()

std::wstring v8::internal::ETWJITInterface::GetScriptMethodNameFromEvent ( const JitCodeEvent * event)

Definition at line 72 of file etw-jit-win.cc.

Here is the caller graph for this function:

◆ GetScriptMethodNameFromSharedFunctionInfo()

std::wstring v8::internal::ETWJITInterface::GetScriptMethodNameFromSharedFunctionInfo ( Tagged< SharedFunctionInfo > sfi)

Definition at line 84 of file etw-jit-win.cc.

Here is the caller graph for this function:

◆ GetSharedFunctionInfo()

Tagged< SharedFunctionInfo > v8::internal::ETWJITInterface::GetSharedFunctionInfo ( const JitCodeEvent * event)

Definition at line 67 of file etw-jit-win.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Header()

auto v8::internal::ETWJITInterface::Header ( size_t size)
constexpr

Definition at line 96 of file etw-jit-metadata-win.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ JoinBytes()

template<std::size_t size1, std::size_t size2>
auto v8::internal::ETWJITInterface::JoinBytes ( const str_bytes< size1 > & str1,
const str_bytes< size2 > & str2 )
constexpr

Definition at line 79 of file etw-jit-metadata-win.h.

Here is the caller graph for this function:

◆ JoinFields() [1/3]

auto v8::internal::ETWJITInterface::JoinFields ( )
constexpr

Definition at line 108 of file etw-jit-metadata-win.h.

Here is the caller graph for this function:

◆ JoinFields() [2/3]

template<typename T1 >
auto v8::internal::ETWJITInterface::JoinFields ( T1 field)
constexpr

Definition at line 112 of file etw-jit-metadata-win.h.

◆ JoinFields() [3/3]

template<typename T1 , typename T2 , typename... Ts>
auto v8::internal::ETWJITInterface::JoinFields ( T1 field1,
T2 field2,
Ts... args )
constexpr

Definition at line 118 of file etw-jit-metadata-win.h.

Here is the call graph for this function:

◆ LogEvent()

ULONG v8::internal::ETWJITInterface::LogEvent ( uint64_t regHandle,
const EVENT_DESCRIPTOR * event_descriptor,
EVENT_DATA_DESCRIPTOR * data_descriptor,
ULONG desc_count )
inline

Definition at line 206 of file etw-jit-metadata-win.h.

Here is the caller graph for this function:

◆ LogEventData()

template<typename T , typename... Fs>
void v8::internal::ETWJITInterface::LogEventData ( const TraceLoggingHProvider provider,
const EVENT_DESCRIPTOR * event_descriptor,
T * meta,
const Fs &... fields )

Definition at line 218 of file etw-jit-metadata-win.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeStrBytes()

template<size_t count, typename idx = std::make_index_sequence<count>>
auto v8::internal::ETWJITInterface::MakeStrBytes ( char const (&) s[count])
constexpr

Definition at line 73 of file etw-jit-metadata-win.h.

Here is the caller graph for this function:

◆ MaybeSetHandlerNow()

void v8::internal::ETWJITInterface::MaybeSetHandlerNow ( Isolate * isolate)

Definition at line 46 of file etw-jit-win.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Register()

void v8::internal::ETWJITInterface::Register ( )

Definition at line 187 of file etw-jit-win.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveIsolate()

void v8::internal::ETWJITInterface::RemoveIsolate ( Isolate * isolate)

Definition at line 203 of file etw-jit-win.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetFieldDescriptors() [1/5]

void v8::internal::ETWJITInterface::SetFieldDescriptors ( EVENT_DATA_DESCRIPTOR * data_descriptors)
inline

Definition at line 157 of file etw-jit-metadata-win.h.

Here is the caller graph for this function:

◆ SetFieldDescriptors() [2/5]

template<typename... Ts>
void v8::internal::ETWJITInterface::SetFieldDescriptors ( EVENT_DATA_DESCRIPTOR * data_descriptors,
const char * value,
const Ts &... rest )

Definition at line 198 of file etw-jit-metadata-win.h.

Here is the call graph for this function:

◆ SetFieldDescriptors() [3/5]

template<typename... Ts>
void v8::internal::ETWJITInterface::SetFieldDescriptors ( EVENT_DATA_DESCRIPTOR * data_descriptors,
const std::string & value,
const Ts &... rest )

Definition at line 190 of file etw-jit-metadata-win.h.

Here is the call graph for this function:

◆ SetFieldDescriptors() [4/5]

template<typename... Ts>
void v8::internal::ETWJITInterface::SetFieldDescriptors ( EVENT_DATA_DESCRIPTOR * data_descriptors,
const std::wstring & value,
const Ts &... rest )

Definition at line 182 of file etw-jit-metadata-win.h.

Here is the call graph for this function:

◆ SetFieldDescriptors() [5/5]

template<typename T , typename... Ts>
void v8::internal::ETWJITInterface::SetFieldDescriptors ( EVENT_DATA_DESCRIPTOR * data_descriptors,
const T & value,
const Ts &... rest )

Definition at line 174 of file etw-jit-metadata-win.h.

Here is the call graph for this function:

◆ SetMetaDescriptors()

void v8::internal::ETWJITInterface::SetMetaDescriptors ( EVENT_DATA_DESCRIPTOR * data_descriptor,
UINT16 const UNALIGNED * traits,
const void * metadata,
size_t size )

Definition at line 11 of file etw-jit-metadata-win.cc.

Here is the caller graph for this function:

◆ Unregister()

void v8::internal::ETWJITInterface::Unregister ( )

Definition at line 192 of file etw-jit-win.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateETWEnabled()

void v8::internal::ETWJITInterface::UpdateETWEnabled ( bool enabled,
uint32_t options )

Definition at line 101 of file etw-jit-win.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ V8_DECLARE_TRACELOGGING_PROVIDER()

v8::internal::ETWJITInterface::V8_DECLARE_TRACELOGGING_PROVIDER ( g_v8Provider )

◆ V8_DEFINE_TRACELOGGING_PROVIDER()

v8::internal::ETWJITInterface::V8_DEFINE_TRACELOGGING_PROVIDER ( g_v8Provider )

Variable Documentation

◆ etw_filter_payload_glob

base::LazyInstance< FilterDataType >::type v8::internal::ETWJITInterface::etw_filter_payload_glob
Initial value:
=
#define LAZY_INSTANCE_INITIALIZER

Definition at line 313 of file etw-isolate-load-script-data-win.cc.

◆ has_active_etw_tracing_session_or_custom_filter

V8_EXPORT_PRIVATE std::atomic< bool > v8::internal::ETWJITInterface::has_active_etw_tracing_session_or_custom_filter = false

Definition at line 44 of file etw-jit-win.cc.

◆ isolate_map

base::LazyInstance< IsolateMapType >::type v8::internal::ETWJITInterface::isolate_map
Initial value:

Definition at line 311 of file etw-isolate-load-script-data-win.cc.

◆ isolates_mutex

base::LazyMutex v8::internal::ETWJITInterface::isolates_mutex = LAZY_MUTEX_INITIALIZER

Definition at line 310 of file etw-isolate-load-script-data-win.cc.

◆ kCaptureStateTimeout

auto v8::internal::ETWJITInterface::kCaptureStateTimeout = base::TimeDelta::FromSeconds(10)
constexpr

Definition at line 39 of file etw-isolate-load-script-data-win.cc.

◆ kEtwControlCaptureState

uint32_t v8::internal::ETWJITInterface::kEtwControlCaptureState = 2
constexpr

Definition at line 33 of file etw-jit-metadata-win.h.

◆ kEtwControlDisable

uint32_t v8::internal::ETWJITInterface::kEtwControlDisable = 0
constexpr

Definition at line 31 of file etw-jit-metadata-win.h.

◆ kEtwControlEnable

uint32_t v8::internal::ETWJITInterface::kEtwControlEnable = 1
constexpr

Definition at line 32 of file etw-jit-metadata-win.h.

◆ kEtwRundown

uint32_t v8::internal::ETWJITInterface::kEtwRundown = 0xf0000000
constexpr

Definition at line 27 of file etw-jit-win.h.

◆ kJScriptRuntimeKeyword

uint64_t v8::internal::ETWJITInterface::kJScriptRuntimeKeyword = 1
constexpr

Definition at line 36 of file etw-jit-metadata-win.h.

◆ kManifestFreeChannel

const uint8_t v8::internal::ETWJITInterface::kManifestFreeChannel = 11

Definition at line 23 of file etw-jit-metadata-win.h.

◆ kMetaDescriptorsCount

const uint8_t v8::internal::ETWJITInterface::kMetaDescriptorsCount = 2

Definition at line 27 of file etw-jit-metadata-win.h.

◆ kMethodDCStartEventID

uint16_t v8::internal::ETWJITInterface::kMethodDCStartEventID = 5
constexpr

Definition at line 41 of file etw-jit-metadata-win.h.

◆ kMethodLoadEventID

uint16_t v8::internal::ETWJITInterface::kMethodLoadEventID = 9
constexpr

Definition at line 39 of file etw-jit-metadata-win.h.

◆ kSourceDCStartEventID

uint16_t v8::internal::ETWJITInterface::kSourceDCStartEventID = 39
constexpr

Definition at line 40 of file etw-jit-metadata-win.h.

◆ kSourceLoadEventID

uint16_t v8::internal::ETWJITInterface::kSourceLoadEventID = 41
constexpr

Definition at line 38 of file etw-jit-metadata-win.h.

◆ kTraceLevel

unsigned char v8::internal::ETWJITInterface::kTraceLevel = TRACE_LEVEL_INFORMATION
constexpr

Definition at line 43 of file etw-jit-metadata-win.h.