| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 303 void ThreadState::visitRoots(Visitor* visitor) | 303 void ThreadState::visitRoots(Visitor* visitor) | 
| 304 { | 304 { | 
| 305     AttachedThreadStateSet& threads = attachedThreads(); | 305     AttachedThreadStateSet& threads = attachedThreads(); | 
| 306     for (AttachedThreadStateSet::iterator it = threads.begin(), end = threads.en
     d(); it != end; ++it) | 306     for (AttachedThreadStateSet::iterator it = threads.begin(), end = threads.en
     d(); it != end; ++it) | 
| 307         (*it)->trace(visitor); | 307         (*it)->trace(visitor); | 
| 308 } | 308 } | 
| 309 | 309 | 
| 310 NO_SANITIZE_ADDRESS | 310 NO_SANITIZE_ADDRESS | 
| 311 void ThreadState::visitStack(Visitor* visitor) | 311 void ThreadState::visitStack(Visitor* visitor) | 
| 312 { | 312 { | 
| 313     Address* end = reinterpret_cast<Address*>(m_startOfStack); | 313     Address* start = reinterpret_cast<Address*>(m_startOfStack); | 
| 314     for (Address* current = reinterpret_cast<Address*>(m_endOfStack); current < 
     end; ++current) { | 314     // If there is a safepoint scope marker we should stop the stack | 
|  | 315     // scanning there to not touch active parts of the stack. Anything | 
|  | 316     // interesting beyond that point is in the safepoint stack copy. | 
|  | 317     // If there is no scope marker the thread is blocked and we should | 
|  | 318     // scan all the way to the recorded end stack pointer. | 
|  | 319     Address* end = reinterpret_cast<Address*>(m_endOfStack); | 
|  | 320     Address* safePointScopeMarker = reinterpret_cast<Address*>(m_safePointScopeM
     arker); | 
|  | 321     Address* current = safePointScopeMarker ? safePointScopeMarker : end; | 
|  | 322     for (; current < start; ++current) { | 
| 315         Heap::checkAndMarkPointer(visitor, *current); | 323         Heap::checkAndMarkPointer(visitor, *current); | 
| 316     } | 324     } | 
| 317 | 325 | 
| 318     for (Vector<Address>::iterator it = m_safePointStackCopy.begin(); it != m_sa
     fePointStackCopy.end(); ++it) | 326     for (Vector<Address>::iterator it = m_safePointStackCopy.begin(); it != m_sa
     fePointStackCopy.end(); ++it) | 
| 319         Heap::checkAndMarkPointer(visitor, *it); | 327         Heap::checkAndMarkPointer(visitor, *it); | 
| 320 } | 328 } | 
| 321 | 329 | 
| 322 void ThreadState::visitPersistents(Visitor* visitor) | 330 void ThreadState::visitPersistents(Visitor* visitor) | 
| 323 { | 331 { | 
| 324     for (PersistentNode* current = m_persistents->m_next; current != m_persisten
     ts; current = current->m_next) { | 332     for (PersistentNode* current = m_persistents->m_next; current != m_persisten
     ts; current = current->m_next) { | 
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 637     state->safePoint(HeapPointersOnStack); | 645     state->safePoint(HeapPointersOnStack); | 
| 638 } | 646 } | 
| 639 | 647 | 
| 640 ThreadState::AttachedThreadStateSet& ThreadState::attachedThreads() | 648 ThreadState::AttachedThreadStateSet& ThreadState::attachedThreads() | 
| 641 { | 649 { | 
| 642     DEFINE_STATIC_LOCAL(AttachedThreadStateSet, threads, ()); | 650     DEFINE_STATIC_LOCAL(AttachedThreadStateSet, threads, ()); | 
| 643     return threads; | 651     return threads; | 
| 644 } | 652 } | 
| 645 | 653 | 
| 646 } | 654 } | 
| OLD | NEW | 
|---|