Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: src/global-handles.cc

Issue 1934993002: Add trace event for phantom handle processing callback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/global-handles.h" 5 #include "src/global-handles.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/v8.h" 8 #include "src/v8.h"
9 #include "src/vm-state-inl.h" 9 #include "src/vm-state-inl.h"
10 10
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 public: 544 public:
545 // Takes ownership of the contents of pending_phantom_callbacks, leaving it in 545 // Takes ownership of the contents of pending_phantom_callbacks, leaving it in
546 // the same state it would be after a call to Clear(). 546 // the same state it would be after a call to Clear().
547 PendingPhantomCallbacksSecondPassTask( 547 PendingPhantomCallbacksSecondPassTask(
548 List<PendingPhantomCallback>* pending_phantom_callbacks, Isolate* isolate) 548 List<PendingPhantomCallback>* pending_phantom_callbacks, Isolate* isolate)
549 : CancelableTask(isolate) { 549 : CancelableTask(isolate) {
550 pending_phantom_callbacks_.Swap(pending_phantom_callbacks); 550 pending_phantom_callbacks_.Swap(pending_phantom_callbacks);
551 } 551 }
552 552
553 void RunInternal() override { 553 void RunInternal() override {
554 TRACE_EVENT0("v8", "V8.GCPhantomHandleProcessingCallback");
554 isolate()->heap()->CallGCPrologueCallbacks( 555 isolate()->heap()->CallGCPrologueCallbacks(
555 GCType::kGCTypeProcessWeakCallbacks, kNoGCCallbackFlags); 556 GCType::kGCTypeProcessWeakCallbacks, kNoGCCallbackFlags);
556 InvokeSecondPassPhantomCallbacks(&pending_phantom_callbacks_, isolate()); 557 InvokeSecondPassPhantomCallbacks(&pending_phantom_callbacks_, isolate());
557 isolate()->heap()->CallGCEpilogueCallbacks( 558 isolate()->heap()->CallGCEpilogueCallbacks(
558 GCType::kGCTypeProcessWeakCallbacks, kNoGCCallbackFlags); 559 GCType::kGCTypeProcessWeakCallbacks, kNoGCCallbackFlags);
559 } 560 }
560 561
561 private: 562 private:
562 List<PendingPhantomCallback> pending_phantom_callbacks_; 563 List<PendingPhantomCallback> pending_phantom_callbacks_;
563 564
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 blocks_[block][offset] = object; 1502 blocks_[block][offset] = object;
1502 if (isolate->heap()->InNewSpace(object)) { 1503 if (isolate->heap()->InNewSpace(object)) {
1503 new_space_indices_.Add(size_); 1504 new_space_indices_.Add(size_);
1504 } 1505 }
1505 *index = size_++; 1506 *index = size_++;
1506 } 1507 }
1507 1508
1508 1509
1509 } // namespace internal 1510 } // namespace internal
1510 } // namespace v8 1511 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698