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

Side by Side Diff: Source/platform/heap/ThreadState.h

Issue 717923005: Profile FreeList Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 m_endOfStack = endOfStack; 459 m_endOfStack = endOfStack;
460 } 460 }
461 461
462 // Get one of the heap structures for this thread. 462 // Get one of the heap structures for this thread.
463 // 463 //
464 // The heap is split into multiple heap parts based on object 464 // The heap is split into multiple heap parts based on object
465 // types. To get the index for a given type, use 465 // types. To get the index for a given type, use
466 // HeapTypeTrait<Type>::index. 466 // HeapTypeTrait<Type>::index.
467 ThreadHeap* heap(int index) const { return m_heaps[index]; } 467 ThreadHeap* heap(int index) const { return m_heaps[index]; }
468 468
469 #if ENABLE(ASSERT) 469 #if ENABLE(ASSERT) || ENABLE(GC_PROFILE_MARKING)
470 // Infrastructure to determine if an address is within one of the 470 // Infrastructure to determine if an address is within one of the
471 // address ranges for the Blink heap. If the address is in the Blink 471 // address ranges for the Blink heap. If the address is in the Blink
472 // heap the containing heap page is returned. 472 // heap the containing heap page is returned.
473 BaseHeapPage* findPageFromAddress(Address); 473 BaseHeapPage* findPageFromAddress(Address);
474 BaseHeapPage* findPageFromAddress(void* pointer) { return findPageFromAddres s(reinterpret_cast<Address>(pointer)); } 474 BaseHeapPage* findPageFromAddress(void* pointer) { return findPageFromAddres s(reinterpret_cast<Address>(pointer)); }
475 #endif 475 #endif
476 476
477 // List of persistent roots allocated on the given thread. 477 // List of persistent roots allocated on the given thread.
478 PersistentNode* roots() const { return m_persistents.get(); } 478 PersistentNode* roots() const { return m_persistents.get(); }
479 479
(...skipping 10 matching lines...) Expand all
490 void visitAsanFakeStackForPointer(Visitor*, Address); 490 void visitAsanFakeStackForPointer(Visitor*, Address);
491 491
492 // Visit all persistents allocated on this thread. 492 // Visit all persistents allocated on this thread.
493 void visitPersistents(Visitor*); 493 void visitPersistents(Visitor*);
494 494
495 #if ENABLE(GC_PROFILE_MARKING) 495 #if ENABLE(GC_PROFILE_MARKING)
496 const GCInfo* findGCInfo(Address); 496 const GCInfo* findGCInfo(Address);
497 static const GCInfo* findGCInfoFromAllThreads(Address); 497 static const GCInfo* findGCInfoFromAllThreads(Address);
498 #endif 498 #endif
499 499
500 #if ENABLE(GC_PROFILE_FREE_LIST)
501 void snapshotFreeListIfNecessary();
502 void snapshotFreeList();
503 #endif
504
500 #if ENABLE(GC_PROFILE_HEAP) 505 #if ENABLE(GC_PROFILE_HEAP)
501 struct SnapshotInfo { 506 struct SnapshotInfo {
502 ThreadState* state; 507 ThreadState* state;
503 508
504 size_t freeSize; 509 size_t freeSize;
505 size_t pageCount; 510 size_t pageCount;
506 511
507 // Map from base-classes to a snapshot class-ids (used as index below). 512 // Map from base-classes to a snapshot class-ids (used as index below).
508 HashMap<const GCInfo*, size_t> classTags; 513 HashMap<const GCInfo*, size_t> classTags;
509 514
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 m_locked = false; 730 m_locked = false;
726 } 731 }
727 732
728 MutexBase& m_mutex; 733 MutexBase& m_mutex;
729 bool m_locked; 734 bool m_locked;
730 }; 735 };
731 736
732 } // namespace blink 737 } // namespace blink
733 738
734 #endif // ThreadState_h 739 #endif // ThreadState_h
OLDNEW
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698