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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 void ThreadState::copyStackUntilSafePointScope() | 928 void ThreadState::copyStackUntilSafePointScope() |
929 { | 929 { |
930 if (!m_safePointScopeMarker || m_stackState == NoHeapPointersOnStack) | 930 if (!m_safePointScopeMarker || m_stackState == NoHeapPointersOnStack) |
931 return; | 931 return; |
932 | 932 |
933 Address* to = reinterpret_cast<Address*>(m_safePointScopeMarker); | 933 Address* to = reinterpret_cast<Address*>(m_safePointScopeMarker); |
934 Address* from = reinterpret_cast<Address*>(m_endOfStack); | 934 Address* from = reinterpret_cast<Address*>(m_endOfStack); |
935 RELEASE_ASSERT(from < to); | 935 RELEASE_ASSERT(from < to); |
936 RELEASE_ASSERT(to <= reinterpret_cast<Address*>(m_startOfStack)); | 936 RELEASE_ASSERT(to <= reinterpret_cast<Address*>(m_startOfStack)); |
937 size_t slotCount = static_cast<size_t>(to - from); | 937 size_t slotCount = static_cast<size_t>(to - from); |
938 ASSERT(slotCount < 1024); // Catch potential performance issues. | 938 // Catch potential performance issues. |
| 939 #if defined(LEAK_SANITIZER) || defined(ADDRESS_SANITIZER) |
| 940 // ASan/LSan use more space on the stack and we therefore |
| 941 // increase the allowed stack copying for those builds. |
| 942 ASSERT(slotCount < 2048); |
| 943 #else |
| 944 ASSERT(slotCount < 1024); |
| 945 #endif |
939 | 946 |
940 ASSERT(!m_safePointStackCopy.size()); | 947 ASSERT(!m_safePointStackCopy.size()); |
941 m_safePointStackCopy.resize(slotCount); | 948 m_safePointStackCopy.resize(slotCount); |
942 for (size_t i = 0; i < slotCount; ++i) { | 949 for (size_t i = 0; i < slotCount; ++i) { |
943 m_safePointStackCopy[i] = from[i]; | 950 m_safePointStackCopy[i] = from[i]; |
944 } | 951 } |
945 } | 952 } |
946 | 953 |
947 void ThreadState::performPendingSweep() | 954 void ThreadState::performPendingSweep() |
948 { | 955 { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 return gcInfo; | 1056 return gcInfo; |
1050 } | 1057 } |
1051 } | 1058 } |
1052 if (needLockForIteration) | 1059 if (needLockForIteration) |
1053 threadAttachMutex().unlock(); | 1060 threadAttachMutex().unlock(); |
1054 return 0; | 1061 return 0; |
1055 } | 1062 } |
1056 #endif | 1063 #endif |
1057 | 1064 |
1058 } | 1065 } |
OLD | NEW |