v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
etw-isolate-capture-state-monitor-win.h
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
5
#ifndef V8_DIAGNOSTICS_ETW_ISOLATE_CAPTURE_STATE_MONITOR_WIN_H_
6
#define V8_DIAGNOSTICS_ETW_ISOLATE_CAPTURE_STATE_MONITOR_WIN_H_
7
8
#include "
src/base/platform/condition-variable.h
"
9
#include "
src/base/platform/mutex.h
"
10
#include "
src/base/platform/time.h
"
11
12
namespace
v8
{
13
namespace
internal
{
14
namespace
ETWJITInterface {
15
16
class
V8_EXPORT_PRIVATE
EtwIsolateCaptureStateMonitor
{
17
public
:
18
EtwIsolateCaptureStateMonitor
(
base::Mutex
*
mutex
,
19
size_t
pending_isolate_count);
20
EtwIsolateCaptureStateMonitor
(
const
EtwIsolateCaptureStateMonitor
&) =
delete
;
21
EtwIsolateCaptureStateMonitor
&
operator=
(
22
const
EtwIsolateCaptureStateMonitor
&) =
delete
;
23
24
// Call from ETW callback thread to wait for the specified time or until
25
// Notify is called pending_isolate_count times.
26
bool
WaitFor(
const
base::TimeDelta
& delta);
27
28
// Called from isolate thread to unblock WaitFor.
29
void
Notify();
30
31
private
:
32
// Must be held prior to calling WaitFor.
33
// Also used to sychronize access when reading/writing the isolate_count_.
34
base::Mutex
*
mutex_
;
35
size_t
pending_isolate_count_
;
36
base::ConditionVariable
isolates_ready_cv_
;
37
// Used to track when WaitFor started and how much of the original timeout
38
// remains when recovering from spurious wakeups.
39
base::TimeTicks
wait_started_
;
40
};
41
42
}
// namespace ETWJITInterface
43
}
// namespace internal
44
}
// namespace v8
45
46
#endif
// V8_DIAGNOSTICS_ETW_ISOLATE_CAPTURE_STATE_MONITOR_WIN_H_
v8::base::ConditionVariable
Definition
condition-variable.h:37
v8::base::Mutex
Definition
mutex.h:36
v8::base::TimeDelta
Definition
time.h:67
v8::base::TimeTicks
Definition
time.h:426
v8::internal::ETWJITInterface::EtwIsolateCaptureStateMonitor
Definition
etw-isolate-capture-state-monitor-win.h:16
v8::internal::ETWJITInterface::EtwIsolateCaptureStateMonitor::isolates_ready_cv_
base::ConditionVariable isolates_ready_cv_
Definition
etw-isolate-capture-state-monitor-win.h:36
v8::internal::ETWJITInterface::EtwIsolateCaptureStateMonitor::wait_started_
base::TimeTicks wait_started_
Definition
etw-isolate-capture-state-monitor-win.h:39
v8::internal::ETWJITInterface::EtwIsolateCaptureStateMonitor::pending_isolate_count_
size_t pending_isolate_count_
Definition
etw-isolate-capture-state-monitor-win.h:35
v8::internal::ETWJITInterface::EtwIsolateCaptureStateMonitor::operator=
EtwIsolateCaptureStateMonitor & operator=(const EtwIsolateCaptureStateMonitor &)=delete
v8::internal::ETWJITInterface::EtwIsolateCaptureStateMonitor::EtwIsolateCaptureStateMonitor
EtwIsolateCaptureStateMonitor(const EtwIsolateCaptureStateMonitor &)=delete
v8::internal::ETWJITInterface::EtwIsolateCaptureStateMonitor::mutex_
base::Mutex * mutex_
Definition
etw-isolate-capture-state-monitor-win.h:34
condition-variable.h
mutex
base::Mutex mutex
Definition
module-compiler.cc:314
mutex.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
V8_EXPORT_PRIVATE
#define V8_EXPORT_PRIVATE
Definition
macros.h:460
time.h
src
diagnostics
etw-isolate-capture-state-monitor-win.h
Generated on Sun Apr 6 2025 21:08:53 for v8 by
1.12.0