Commit 2d14b0bd authored by Marja Hölttä's avatar Marja Hölttä Committed by V8 LUCI CQ

[heap] Unify parameter order in MoveEvent funcs

Now it's "source, target" in all places.

Change-Id: I6ce943214c79467aca4e3b62c3376921e206842a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3870917
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82940}
parent 5d50024e
...@@ -3426,7 +3426,7 @@ bool MayContainRecordedSlots(HeapObject object) { ...@@ -3426,7 +3426,7 @@ bool MayContainRecordedSlots(HeapObject object) {
} }
} // namespace } // namespace
void Heap::OnMoveEvent(HeapObject target, HeapObject source, void Heap::OnMoveEvent(HeapObject source, HeapObject target,
int size_in_bytes) { int size_in_bytes) {
HeapProfiler* heap_profiler = isolate_->heap_profiler(); HeapProfiler* heap_profiler = isolate_->heap_profiler();
if (heap_profiler->is_tracking_object_moves()) { if (heap_profiler->is_tracking_object_moves()) {
...@@ -3515,7 +3515,7 @@ FixedArrayBase Heap::LeftTrimFixedArray(FixedArrayBase object, ...@@ -3515,7 +3515,7 @@ FixedArrayBase Heap::LeftTrimFixedArray(FixedArrayBase object,
if (isolate()->log_object_relocation()) { if (isolate()->log_object_relocation()) {
// Notify the heap profiler of change in object layout. // Notify the heap profiler of change in object layout.
OnMoveEvent(new_object, object, new_object.Size()); OnMoveEvent(object, new_object, new_object.Size());
} }
#ifdef ENABLE_SLOW_DCHECKS #ifdef ENABLE_SLOW_DCHECKS
......
...@@ -784,7 +784,7 @@ class Heap { ...@@ -784,7 +784,7 @@ class Heap {
Handle<Map> map); Handle<Map> map);
// This event is triggered after object is moved to a new place. // This event is triggered after object is moved to a new place.
void OnMoveEvent(HeapObject target, HeapObject source, int size_in_bytes); void OnMoveEvent(HeapObject source, HeapObject target, int size_in_bytes);
bool deserialization_complete() const { return deserialization_complete_; } bool deserialization_complete() const { return deserialization_complete_; }
......
...@@ -1663,7 +1663,7 @@ class ProfilingMigrationObserver final : public MigrationObserver { ...@@ -1663,7 +1663,7 @@ class ProfilingMigrationObserver final : public MigrationObserver {
PROFILE(heap_->isolate(), PROFILE(heap_->isolate(),
CodeMoveEvent(AbstractCode::cast(src), AbstractCode::cast(dst))); CodeMoveEvent(AbstractCode::cast(src), AbstractCode::cast(dst)));
} }
heap_->OnMoveEvent(dst, src, size); heap_->OnMoveEvent(src, dst, size);
} }
}; };
......
...@@ -106,7 +106,7 @@ bool Scavenger::MigrateObject(Map map, HeapObject source, HeapObject target, ...@@ -106,7 +106,7 @@ bool Scavenger::MigrateObject(Map map, HeapObject source, HeapObject target,
} }
if (V8_UNLIKELY(is_logging_)) { if (V8_UNLIKELY(is_logging_)) {
heap()->OnMoveEvent(target, source, size); heap()->OnMoveEvent(source, target, size);
} }
if (is_incremental_marking_ && if (is_incremental_marking_ &&
......
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