[heap] Remove obsolete AbortTracing calls and deprecate interface
V8 does not abort incremental marking anymore. Bug: chromium:843903 Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Change-Id: Id39e9cf8ef2afc388bab2bbad1d458ee2649f8e8 Reviewed-on: https://chromium-review.googlesource.com/1226889 Reviewed-by: Hannes Payer <hpayer@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#56009}
This commit is contained in:
parent
5cfe1a6b12
commit
1f3802a1e7
@ -7021,7 +7021,8 @@ class V8_EXPORT EmbedderHeapTracer {
|
|||||||
* The embedder is expected to throw away all intermediate data and reset to
|
* The embedder is expected to throw away all intermediate data and reset to
|
||||||
* the initial state.
|
* the initial state.
|
||||||
*/
|
*/
|
||||||
virtual void AbortTracing() = 0;
|
V8_DEPRECATE_SOON("Obsolete as V8 will not abort tracing anymore.",
|
||||||
|
virtual void AbortTracing()) {}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called by the embedder to request immediate finalization of the currently
|
* Called by the embedder to request immediate finalization of the currently
|
||||||
|
@ -24,13 +24,6 @@ void LocalEmbedderHeapTracer::TraceEpilogue() {
|
|||||||
remote_tracer_->TraceEpilogue();
|
remote_tracer_->TraceEpilogue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalEmbedderHeapTracer::AbortTracing() {
|
|
||||||
if (!InUse()) return;
|
|
||||||
|
|
||||||
cached_wrappers_to_trace_.clear();
|
|
||||||
remote_tracer_->AbortTracing();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LocalEmbedderHeapTracer::EnterFinalPause() {
|
void LocalEmbedderHeapTracer::EnterFinalPause() {
|
||||||
if (!InUse()) return;
|
if (!InUse()) return;
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ class V8_EXPORT_PRIVATE LocalEmbedderHeapTracer final {
|
|||||||
|
|
||||||
void TracePrologue();
|
void TracePrologue();
|
||||||
void TraceEpilogue();
|
void TraceEpilogue();
|
||||||
void AbortTracing();
|
|
||||||
void EnterFinalPause();
|
void EnterFinalPause();
|
||||||
bool Trace(double deadline);
|
bool Trace(double deadline);
|
||||||
bool IsRemoteTracingDone();
|
bool IsRemoteTracingDone();
|
||||||
|
@ -33,7 +33,6 @@ class MockEmbedderHeapTracer : public EmbedderHeapTracer {
|
|||||||
public:
|
public:
|
||||||
MOCK_METHOD0(TracePrologue, void());
|
MOCK_METHOD0(TracePrologue, void());
|
||||||
MOCK_METHOD0(TraceEpilogue, void());
|
MOCK_METHOD0(TraceEpilogue, void());
|
||||||
MOCK_METHOD0(AbortTracing, void());
|
|
||||||
MOCK_METHOD1(EnterFinalPause, void(EmbedderHeapTracer::EmbedderStackState));
|
MOCK_METHOD1(EnterFinalPause, void(EmbedderHeapTracer::EmbedderStackState));
|
||||||
MOCK_METHOD0(IsTracingDone, bool());
|
MOCK_METHOD0(IsTracingDone, bool());
|
||||||
MOCK_METHOD1(RegisterV8References,
|
MOCK_METHOD1(RegisterV8References,
|
||||||
@ -76,24 +75,6 @@ TEST(LocalEmbedderHeapTracer, TraceEpilogueForwards) {
|
|||||||
local_tracer.TraceEpilogue();
|
local_tracer.TraceEpilogue();
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(LocalEmbedderHeapTracer, AbortTracingForwards) {
|
|
||||||
StrictMock<MockEmbedderHeapTracer> remote_tracer;
|
|
||||||
LocalEmbedderHeapTracer local_tracer(nullptr);
|
|
||||||
local_tracer.SetRemoteTracer(&remote_tracer);
|
|
||||||
EXPECT_CALL(remote_tracer, AbortTracing());
|
|
||||||
local_tracer.AbortTracing();
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST(LocalEmbedderHeapTracer, AbortTracingClearsCachedWrappers) {
|
|
||||||
StrictMock<MockEmbedderHeapTracer> remote_tracer;
|
|
||||||
LocalEmbedderHeapTracer local_tracer(nullptr);
|
|
||||||
local_tracer.SetRemoteTracer(&remote_tracer);
|
|
||||||
local_tracer.AddWrapperToTrace(CreateWrapperInfo());
|
|
||||||
EXPECT_CALL(remote_tracer, AbortTracing());
|
|
||||||
local_tracer.AbortTracing();
|
|
||||||
EXPECT_EQ(0u, local_tracer.NumberOfCachedWrappersToTrace());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST(LocalEmbedderHeapTracer, EnterFinalPauseForwards) {
|
TEST(LocalEmbedderHeapTracer, EnterFinalPauseForwards) {
|
||||||
StrictMock<MockEmbedderHeapTracer> remote_tracer;
|
StrictMock<MockEmbedderHeapTracer> remote_tracer;
|
||||||
LocalEmbedderHeapTracer local_tracer(nullptr);
|
LocalEmbedderHeapTracer local_tracer(nullptr);
|
||||||
|
Loading…
Reference in New Issue
Block a user