| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 time_t tv = time(NULL); | 319 time_t tv = time(NULL); |
| 320 struct tm* t = localtime(&tv); | 320 struct tm* t = localtime(&tv); |
| 321 // tm_gmtoff includes any daylight savings offset, so subtract it. | 321 // tm_gmtoff includes any daylight savings offset, so subtract it. |
| 322 return static_cast<double>(t->tm_gmtoff * msPerSecond - | 322 return static_cast<double>(t->tm_gmtoff * msPerSecond - |
| 323 (t->tm_isdst > 0 ? 3600 * msPerSecond : 0)); | 323 (t->tm_isdst > 0 ? 3600 * msPerSecond : 0)); |
| 324 } | 324 } |
| 325 | 325 |
| 326 | 326 |
| 327 // We keep the lowest and highest addresses mapped as a quick way of | 327 // We keep the lowest and highest addresses mapped as a quick way of |
| 328 // determining that pointers are outside the heap (used mostly in assertions | 328 // determining that pointers are outside the heap (used mostly in assertions |
| 329 // and verification). The estimate is conservative, ie, not all addresses in | 329 // and verification). The estimate is conservative, i.e., not all addresses in |
| 330 // 'allocated' space are actually allocated to our heap. The range is | 330 // 'allocated' space are actually allocated to our heap. The range is |
| 331 // [lowest, highest), inclusive on the low and and exclusive on the high end. | 331 // [lowest, highest), inclusive on the low and and exclusive on the high end. |
| 332 static void* lowest_ever_allocated = reinterpret_cast<void*>(-1); | 332 static void* lowest_ever_allocated = reinterpret_cast<void*>(-1); |
| 333 static void* highest_ever_allocated = reinterpret_cast<void*>(0); | 333 static void* highest_ever_allocated = reinterpret_cast<void*>(0); |
| 334 | 334 |
| 335 | 335 |
| 336 static void UpdateAllocatedSpaceLimits(void* address, int size) { | 336 static void UpdateAllocatedSpaceLimits(void* address, int size) { |
| 337 ASSERT(limit_mutex != NULL); | 337 ASSERT(limit_mutex != NULL); |
| 338 ScopedLock lock(limit_mutex); | 338 ScopedLock lock(limit_mutex); |
| 339 | 339 |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1208 | 1208 |
| 1209 | 1209 |
| 1210 void Sampler::Stop() { | 1210 void Sampler::Stop() { |
| 1211 ASSERT(IsActive()); | 1211 ASSERT(IsActive()); |
| 1212 SignalSender::RemoveActiveSampler(this); | 1212 SignalSender::RemoveActiveSampler(this); |
| 1213 SetActive(false); | 1213 SetActive(false); |
| 1214 } | 1214 } |
| 1215 | 1215 |
| 1216 | 1216 |
| 1217 } } // namespace v8::internal | 1217 } } // namespace v8::internal |
| OLD | NEW |