Commit fb9136cf authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[heap] Split BACKGROUND_ARRAY_BUFFER_SWEEP into young and full version

Change-Id: I5a42e582bec48a0f10f4914295e0c9a267e37b57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2565518Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71507}
parent 9d72d08a
...@@ -149,9 +149,12 @@ void ArrayBufferSweeper::RequestSweep(SweepingScope scope) { ...@@ -149,9 +149,12 @@ void ArrayBufferSweeper::RequestSweep(SweepingScope scope) {
FLAG_concurrent_array_buffer_sweeping) { FLAG_concurrent_array_buffer_sweeping) {
Prepare(scope); Prepare(scope);
auto task = MakeCancelableTask(heap_->isolate(), [this] { auto task = MakeCancelableTask(heap_->isolate(), [this, scope] {
TRACE_GC1(heap_->tracer(), GCTracer::Scope::BACKGROUND_ARRAY_BUFFER_SWEEP, GCTracer::Scope::ScopeId scope_id =
ThreadKind::kBackground); scope == SweepingScope::kYoung
? GCTracer::Scope::BACKGROUND_YOUNG_ARRAY_BUFFER_SWEEP
: GCTracer::Scope::BACKGROUND_FULL_ARRAY_BUFFER_SWEEP;
TRACE_GC1(heap_->tracer(), scope_id, ThreadKind::kBackground);
base::MutexGuard guard(&sweeping_mutex_); base::MutexGuard guard(&sweeping_mutex_);
job_->Sweep(); job_->Sweep();
job_finished_.NotifyAll(); job_finished_.NotifyAll();
......
...@@ -80,7 +80,7 @@ class V8_EXPORT_PRIVATE GCTracer { ...@@ -80,7 +80,7 @@ class V8_EXPORT_PRIVATE GCTracer {
FIRST_SCOPE = MC_INCREMENTAL, FIRST_SCOPE = MC_INCREMENTAL,
NUMBER_OF_INCREMENTAL_SCOPES = NUMBER_OF_INCREMENTAL_SCOPES =
LAST_INCREMENTAL_SCOPE - FIRST_INCREMENTAL_SCOPE + 1, LAST_INCREMENTAL_SCOPE - FIRST_INCREMENTAL_SCOPE + 1,
FIRST_GENERAL_BACKGROUND_SCOPE = BACKGROUND_ARRAY_BUFFER_SWEEP, FIRST_GENERAL_BACKGROUND_SCOPE = BACKGROUND_YOUNG_ARRAY_BUFFER_SWEEP,
LAST_GENERAL_BACKGROUND_SCOPE = BACKGROUND_UNMAPPER, LAST_GENERAL_BACKGROUND_SCOPE = BACKGROUND_UNMAPPER,
FIRST_MC_BACKGROUND_SCOPE = MC_BACKGROUND_EVACUATE_COPY, FIRST_MC_BACKGROUND_SCOPE = MC_BACKGROUND_EVACUATE_COPY,
LAST_MC_BACKGROUND_SCOPE = MC_BACKGROUND_SWEEPING, LAST_MC_BACKGROUND_SCOPE = MC_BACKGROUND_SWEEPING,
......
...@@ -507,7 +507,8 @@ ...@@ -507,7 +507,8 @@
F(STOP_THE_WORLD) F(STOP_THE_WORLD)
#define TRACER_BACKGROUND_SCOPES(F) \ #define TRACER_BACKGROUND_SCOPES(F) \
F(BACKGROUND_ARRAY_BUFFER_SWEEP) \ F(BACKGROUND_YOUNG_ARRAY_BUFFER_SWEEP) \
F(BACKGROUND_FULL_ARRAY_BUFFER_SWEEP) \
F(BACKGROUND_COLLECTION) \ F(BACKGROUND_COLLECTION) \
F(BACKGROUND_UNMAPPER) \ F(BACKGROUND_UNMAPPER) \
F(MC_BACKGROUND_EVACUATE_COPY) \ F(MC_BACKGROUND_EVACUATE_COPY) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment