Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: src/platform-linux.cc

Issue 2091019: CPU profiler: make code events handling scalable. (Closed)
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 return 8; 158 return 8;
159 #elif V8_TARGET_ARCH_MIPS 159 #elif V8_TARGET_ARCH_MIPS
160 return 8; 160 return 8;
161 #endif 161 #endif
162 // With gcc 4.4 the tree vectorization optimizer can generate code 162 // With gcc 4.4 the tree vectorization optimizer can generate code
163 // that requires 16 byte alignment such as movdqa on x86. 163 // that requires 16 byte alignment such as movdqa on x86.
164 return 16; 164 return 16;
165 } 165 }
166 166
167 167
168 #ifdef V8_TARGET_ARCH_ARM
169 // 0xffff0fa0 is the hard coded address of a function provided by
170 // the kernel which implements a memory barrier. On older
171 // ARM architecture revisions (pre-v6) this may be implemented using
172 // a syscall. This address is stable, and in active use (hard coded)
173 // by at least glibc-2.7 and the Android C library.
174 typedef void (*LinuxKernelMemoryBarrierFunc)(void);
175 LinuxKernelMemoryBarrierFunc pLinuxKernelMemoryBarrier __attribute__((weak)) =
176 (LinuxKernelMemoryBarrierFunc) 0xffff0fa0;
177 #endif
178
179 void OS::ReleaseStore(volatile AtomicWord* ptr, AtomicWord value) {
180 #ifdef V8_TARGET_ARCH_ARM
181 pLinuxKernelMemoryBarrier();
182 #else
183 __asm__ __volatile__("" : : : "memory");
184 // An x86 store acts as a release barrier.
185 #endif
186 *ptr = value;
187 }
188
189
168 const char* OS::LocalTimezone(double time) { 190 const char* OS::LocalTimezone(double time) {
169 if (isnan(time)) return ""; 191 if (isnan(time)) return "";
170 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); 192 time_t tv = static_cast<time_t>(floor(time/msPerSecond));
171 struct tm* t = localtime(&tv); 193 struct tm* t = localtime(&tv);
172 if (NULL == t) return ""; 194 if (NULL == t) return "";
173 return t->tm_zone; 195 return t->tm_zone;
174 } 196 }
175 197
176 198
177 double OS::LocalTimeOffset() { 199 double OS::LocalTimeOffset() {
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 852
831 // This sampler is no longer the active sampler. 853 // This sampler is no longer the active sampler.
832 active_sampler_ = NULL; 854 active_sampler_ = NULL;
833 active_ = false; 855 active_ = false;
834 } 856 }
835 857
836 858
837 #endif // ENABLE_LOGGING_AND_PROFILING 859 #endif // ENABLE_LOGGING_AND_PROFILING
838 860
839 } } // namespace v8::internal 861 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform.h ('k') | src/platform-macos.cc » ('j') | src/unbound-queue.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698