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

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

Issue 1363033003: Make TimelineEventBlocks reclaimable (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
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 "vm/thread.h" 5 #include "vm/thread.h"
6 6
7 #include "vm/growable_array.h" 7 #include "vm/growable_array.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/lockers.h" 9 #include "vm/lockers.h"
10 #include "vm/log.h" 10 #include "vm/log.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 #endif 336 #endif
337 ASSERT(callback != NULL); 337 ASSERT(callback != NULL);
338 ASSERT(data != NULL); 338 ASSERT(data != NULL);
339 *callback = thread_interrupt_callback_; 339 *callback = thread_interrupt_callback_;
340 *data = thread_interrupt_data_; 340 *data = thread_interrupt_data_;
341 return (*callback != NULL) && 341 return (*callback != NULL) &&
342 (*data != NULL); 342 (*data != NULL);
343 } 343 }
344 344
345 345
346 void Thread::CloseTimelineBlock() { 346 void Thread::CloseTimelineBlock() {
turnidge 2015/09/24 17:05:52 Close -> Reclaim? (Note from offfline discussion:
Cutch 2015/09/24 18:14:16 This was unused and is now removed.
347 MutexLocker ml(timeline_block_lock());
347 if (timeline_block() != NULL) { 348 if (timeline_block() != NULL) {
348 timeline_block()->Finish(); 349 timeline_block()->Finish();
349 set_timeline_block(NULL); 350 set_timeline_block(NULL);
350 } 351 }
351 } 352 }
352 353
353 354
354 bool Thread::CanLoadFromThread(const Object& object) { 355 bool Thread::CanLoadFromThread(const Object& object) {
355 #define CHECK_OBJECT(type_name, member_name, expr, default_init_value) \ 356 #define CHECK_OBJECT(type_name, member_name, expr, default_init_value) \
356 if (object.raw() == expr) return true; 357 if (object.raw() == expr) return true;
(...skipping 27 matching lines...) Expand all
384 return Thread::name##_entry_point_offset(); \ 385 return Thread::name##_entry_point_offset(); \
385 } 386 }
386 LEAF_RUNTIME_ENTRY_LIST(COMPUTE_OFFSET) 387 LEAF_RUNTIME_ENTRY_LIST(COMPUTE_OFFSET)
387 #undef COMPUTE_OFFSET 388 #undef COMPUTE_OFFSET
388 389
389 UNREACHABLE(); 390 UNREACHABLE();
390 return -1; 391 return -1;
391 } 392 }
392 393
393 } // namespace dart 394 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/thread.h ('k') | runtime/vm/thread_registry.h » ('j') | runtime/vm/thread_registry.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698