OLD | NEW |
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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 // Visit local thread stack and trace all pointers conservatively. | 482 // Visit local thread stack and trace all pointers conservatively. |
483 void visitStack(Visitor*); | 483 void visitStack(Visitor*); |
484 | 484 |
485 // Visit the asan fake stack frame corresponding to a slot on the | 485 // Visit the asan fake stack frame corresponding to a slot on the |
486 // real machine stack if there is one. | 486 // real machine stack if there is one. |
487 void visitAsanFakeStackForPointer(Visitor*, Address); | 487 void visitAsanFakeStackForPointer(Visitor*, Address); |
488 | 488 |
489 // Visit all persistents allocated on this thread. | 489 // Visit all persistents allocated on this thread. |
490 void visitPersistents(Visitor*); | 490 void visitPersistents(Visitor*); |
491 | 491 |
| 492 struct GCSnapshotInfo { |
| 493 // Map from base-classes to a snapshot class-ids (used as index below). |
| 494 using ClassTagMap = HashMap<const GCInfo*, size_t>; |
| 495 ClassTagMap classTags; |
| 496 |
| 497 // Map from class-id (index) to count/size. |
| 498 Vector<int> liveCount; |
| 499 Vector<int> deadCount; |
| 500 Vector<size_t> liveSize; |
| 501 Vector<size_t> deadSize; |
| 502 |
| 503 size_t getClassTag(const GCInfo*); |
| 504 }; |
| 505 |
492 #if ENABLE(GC_PROFILING) | 506 #if ENABLE(GC_PROFILING) |
493 const GCInfo* findGCInfo(Address); | 507 const GCInfo* findGCInfo(Address); |
494 static const GCInfo* findGCInfoFromAllThreads(Address); | 508 static const GCInfo* findGCInfoFromAllThreads(Address); |
495 | 509 |
496 struct SnapshotInfo { | 510 struct SnapshotInfo { |
497 ThreadState* state; | 511 ThreadState* state; |
498 | 512 |
499 size_t freeSize; | 513 size_t freeSize; |
500 size_t pageCount; | 514 size_t pageCount; |
501 | 515 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 }; | 789 }; |
776 | 790 |
777 template<> class ThreadStateFor<AnyThread> { | 791 template<> class ThreadStateFor<AnyThread> { |
778 public: | 792 public: |
779 static ThreadState* state() { return ThreadState::current(); } | 793 static ThreadState* state() { return ThreadState::current(); } |
780 }; | 794 }; |
781 | 795 |
782 } // namespace blink | 796 } // namespace blink |
783 | 797 |
784 #endif // ThreadState_h | 798 #endif // ThreadState_h |
OLD | NEW |