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

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

Issue 311263008: Make |Heap::findGCInfo()| threadsafe. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: move iteration to ThreadState Created 6 years, 6 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Checks a given address and if a pointer into the oilpan heap marks 492 // Checks a given address and if a pointer into the oilpan heap marks
493 // the object to which it points. 493 // the object to which it points.
494 bool checkAndMarkPointer(Visitor*, Address); 494 bool checkAndMarkPointer(Visitor*, Address);
495 495
496 #if ENABLE(GC_TRACING) 496 #if ENABLE(GC_TRACING)
497 const GCInfo* findGCInfo(Address); 497 const GCInfo* findGCInfo(Address);
498 static const GCInfo* findGCInfoFromAllThreads(Address);
498 #endif 499 #endif
499 500
500 void pushWeakObjectPointerCallback(void*, WeakPointerCallback); 501 void pushWeakObjectPointerCallback(void*, WeakPointerCallback);
501 bool popAndInvokeWeakPointerCallback(Visitor*); 502 bool popAndInvokeWeakPointerCallback(Visitor*);
502 503
503 void getStats(HeapStats&); 504 void getStats(HeapStats&);
504 HeapStats& stats() { return m_stats; } 505 HeapStats& stats() { return m_stats; }
505 HeapStats& statsAfterLastGC() { return m_statsAfterLastGC; } 506 HeapStats& statsAfterLastGC() { return m_statsAfterLastGC; }
506 507
507 private: 508 private:
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 }; 597 };
597 598
598 template<> class ThreadStateFor<AnyThread> { 599 template<> class ThreadStateFor<AnyThread> {
599 public: 600 public:
600 static ThreadState* state() { return ThreadState::current(); } 601 static ThreadState* state() { return ThreadState::current(); }
601 }; 602 };
602 603
603 } 604 }
604 605
605 #endif // ThreadState_h 606 #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