OLD | NEW |
1 // Copyright 2006-2011 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 struct tm* loc = localtime(&utc); | 107 struct tm* loc = localtime(&utc); |
108 ASSERT(loc != NULL); | 108 ASSERT(loc != NULL); |
109 // time - localtime includes any daylight savings offset, so subtract it. | 109 // time - localtime includes any daylight savings offset, so subtract it. |
110 return static_cast<double>((mktime(loc) - utc) * msPerSecond - | 110 return static_cast<double>((mktime(loc) - utc) * msPerSecond - |
111 (loc->tm_isdst > 0 ? 3600 * msPerSecond : 0)); | 111 (loc->tm_isdst > 0 ? 3600 * msPerSecond : 0)); |
112 } | 112 } |
113 | 113 |
114 | 114 |
115 // We keep the lowest and highest addresses mapped as a quick way of | 115 // We keep the lowest and highest addresses mapped as a quick way of |
116 // determining that pointers are outside the heap (used mostly in assertions | 116 // determining that pointers are outside the heap (used mostly in assertions |
117 // and verification). The estimate is conservative, ie, not all addresses in | 117 // and verification). The estimate is conservative, i.e., not all addresses in |
118 // 'allocated' space are actually allocated to our heap. The range is | 118 // 'allocated' space are actually allocated to our heap. The range is |
119 // [lowest, highest), inclusive on the low and and exclusive on the high end. | 119 // [lowest, highest), inclusive on the low and and exclusive on the high end. |
120 static void* lowest_ever_allocated = reinterpret_cast<void*>(-1); | 120 static void* lowest_ever_allocated = reinterpret_cast<void*>(-1); |
121 static void* highest_ever_allocated = reinterpret_cast<void*>(0); | 121 static void* highest_ever_allocated = reinterpret_cast<void*>(0); |
122 | 122 |
123 | 123 |
124 static void UpdateAllocatedSpaceLimits(void* address, int size) { | 124 static void UpdateAllocatedSpaceLimits(void* address, int size) { |
125 ASSERT(limit_mutex != NULL); | 125 ASSERT(limit_mutex != NULL); |
126 ScopedLock lock(limit_mutex); | 126 ScopedLock lock(limit_mutex); |
127 | 127 |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 | 754 |
755 | 755 |
756 void Sampler::Stop() { | 756 void Sampler::Stop() { |
757 ASSERT(IsActive()); | 757 ASSERT(IsActive()); |
758 SamplerThread::RemoveActiveSampler(this); | 758 SamplerThread::RemoveActiveSampler(this); |
759 SetActive(false); | 759 SetActive(false); |
760 } | 760 } |
761 | 761 |
762 | 762 |
763 } } // namespace v8::internal | 763 } } // namespace v8::internal |
OLD | NEW |