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

Side by Side Diff: runtime/vm/timeline.cc

Issue 1807293002: - Fix for issue 25950 (add registration of a thread exit callback) (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-review-comments Created 4 years, 9 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 | « runtime/vm/thread_pool.cc ('k') | 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 (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <cstdlib> 5 #include <cstdlib>
6 6
7 #include "vm/atomic.h" 7 #include "vm/atomic.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/json_stream.h" 9 #include "vm/json_stream.h"
10 #include "vm/lockers.h" 10 #include "vm/lockers.h"
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 } 986 }
987 #endif // defined(DEBUG) 987 #endif // defined(DEBUG)
988 thread_block_lock->Unlock(); 988 thread_block_lock->Unlock();
989 } 989 }
990 990
991 991
992 void TimelineEventRecorder::WriteTo(const char* directory) { 992 void TimelineEventRecorder::WriteTo(const char* directory) {
993 if (!FLAG_support_service) { 993 if (!FLAG_support_service) {
994 return; 994 return;
995 } 995 }
996 Dart_FileOpenCallback file_open = Isolate::file_open_callback(); 996 Dart_FileOpenCallback file_open = Dart::file_open_callback();
997 Dart_FileWriteCallback file_write = Isolate::file_write_callback(); 997 Dart_FileWriteCallback file_write = Dart::file_write_callback();
998 Dart_FileCloseCallback file_close = Isolate::file_close_callback(); 998 Dart_FileCloseCallback file_close = Dart::file_close_callback();
999 if ((file_open == NULL) || (file_write == NULL) || (file_close == NULL)) { 999 if ((file_open == NULL) || (file_write == NULL) || (file_close == NULL)) {
1000 return; 1000 return;
1001 } 1001 }
1002 Thread* T = Thread::Current(); 1002 Thread* T = Thread::Current();
1003 StackZone zone(T); 1003 StackZone zone(T);
1004 1004
1005 Timeline::ReclaimCachedBlocksFromThreads(); 1005 Timeline::ReclaimCachedBlocksFromThreads();
1006 1006
1007 intptr_t pid = OS::ProcessId(); 1007 intptr_t pid = OS::ProcessId();
1008 char* filename = OS::SCreate(NULL, 1008 char* filename = OS::SCreate(NULL,
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 TimelineEventBlock* TimelineEventBlockIterator::Next() { 1504 TimelineEventBlock* TimelineEventBlockIterator::Next() {
1505 ASSERT(current_ != NULL); 1505 ASSERT(current_ != NULL);
1506 TimelineEventBlock* r = current_; 1506 TimelineEventBlock* r = current_;
1507 current_ = current_->next(); 1507 current_ = current_->next();
1508 return r; 1508 return r;
1509 } 1509 }
1510 1510
1511 #endif // !PRODUCT 1511 #endif // !PRODUCT
1512 1512
1513 } // namespace dart 1513 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/thread_pool.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698