| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 time_t tv = time(NULL); | 139 time_t tv = time(NULL); |
| 140 struct tm* t = localtime(&tv); | 140 struct tm* t = localtime(&tv); |
| 141 // tm_gmtoff includes any daylight savings offset, so subtract it. | 141 // tm_gmtoff includes any daylight savings offset, so subtract it. |
| 142 return static_cast<double>(t->tm_gmtoff * msPerSecond - | 142 return static_cast<double>(t->tm_gmtoff * msPerSecond - |
| 143 (t->tm_isdst > 0 ? 3600 * msPerSecond : 0)); | 143 (t->tm_isdst > 0 ? 3600 * msPerSecond : 0)); |
| 144 } | 144 } |
| 145 | 145 |
| 146 | 146 |
| 147 // We keep the lowest and highest addresses mapped as a quick way of | 147 // We keep the lowest and highest addresses mapped as a quick way of |
| 148 // determining that pointers are outside the heap (used mostly in assertions | 148 // determining that pointers are outside the heap (used mostly in assertions |
| 149 // and verification). The estimate is conservative, ie, not all addresses in | 149 // and verification). The estimate is conservative, i.e., not all addresses in |
| 150 // 'allocated' space are actually allocated to our heap. The range is | 150 // 'allocated' space are actually allocated to our heap. The range is |
| 151 // [lowest, highest), inclusive on the low and and exclusive on the high end. | 151 // [lowest, highest), inclusive on the low and and exclusive on the high end. |
| 152 static void* lowest_ever_allocated = reinterpret_cast<void*>(-1); | 152 static void* lowest_ever_allocated = reinterpret_cast<void*>(-1); |
| 153 static void* highest_ever_allocated = reinterpret_cast<void*>(0); | 153 static void* highest_ever_allocated = reinterpret_cast<void*>(0); |
| 154 | 154 |
| 155 | 155 |
| 156 static void UpdateAllocatedSpaceLimits(void* address, int size) { | 156 static void UpdateAllocatedSpaceLimits(void* address, int size) { |
| 157 ASSERT(limit_mutex != NULL); | 157 ASSERT(limit_mutex != NULL); |
| 158 ScopedLock lock(limit_mutex); | 158 ScopedLock lock(limit_mutex); |
| 159 | 159 |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 | 957 |
| 958 | 958 |
| 959 void Sampler::Stop() { | 959 void Sampler::Stop() { |
| 960 ASSERT(IsActive()); | 960 ASSERT(IsActive()); |
| 961 SignalSender::RemoveActiveSampler(this); | 961 SignalSender::RemoveActiveSampler(this); |
| 962 SetActive(false); | 962 SetActive(false); |
| 963 } | 963 } |
| 964 | 964 |
| 965 | 965 |
| 966 } } // namespace v8::internal | 966 } } // namespace v8::internal |
| OLD | NEW |