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

Side by Side Diff: src/platform.h

Issue 3831002: Support profiling based on linux kernel performance events. (Closed)
Patch Set: More fixes Created 10 years, 2 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
« no previous file with comments | « src/log-utils.cc ('k') | src/platform-freebsd.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // Safe formatting print. Ensures that str is always null-terminated. 250 // Safe formatting print. Ensures that str is always null-terminated.
251 // Returns the number of chars written, or -1 if output was truncated. 251 // Returns the number of chars written, or -1 if output was truncated.
252 static int SNPrintF(Vector<char> str, const char* format, ...); 252 static int SNPrintF(Vector<char> str, const char* format, ...);
253 static int VSNPrintF(Vector<char> str, 253 static int VSNPrintF(Vector<char> str,
254 const char* format, 254 const char* format,
255 va_list args); 255 va_list args);
256 256
257 static char* StrChr(char* str, int c); 257 static char* StrChr(char* str, int c);
258 static void StrNCpy(Vector<char> dest, const char* src, size_t n); 258 static void StrNCpy(Vector<char> dest, const char* src, size_t n);
259 259
260 // Support for profiler. Can do nothing, in which case ticks 260 // Support for the profiler. Can do nothing, in which case ticks
261 // occuring in shared libraries will not be properly accounted 261 // occuring in shared libraries will not be properly accounted for.
262 // for.
263 static void LogSharedLibraryAddresses(); 262 static void LogSharedLibraryAddresses();
264 263
264 // Support for the profiler. Notifies the external profiling
265 // process that a code moving garbage collection starts. Can do
266 // nothing, in which case the code objects must not move (e.g., by
267 // using --never-compact) if accurate profiling is desired.
268 static void SignalCodeMovingGC();
269
265 // The return value indicates the CPU features we are sure of because of the 270 // The return value indicates the CPU features we are sure of because of the
266 // OS. For example MacOSX doesn't run on any x86 CPUs that don't have SSE2 271 // OS. For example MacOSX doesn't run on any x86 CPUs that don't have SSE2
267 // instructions. 272 // instructions.
268 // This is a little messy because the interpretation is subject to the cross 273 // This is a little messy because the interpretation is subject to the cross
269 // of the CPU and the OS. The bits in the answer correspond to the bit 274 // of the CPU and the OS. The bits in the answer correspond to the bit
270 // positions indicated by the members of the CpuFeature enum from globals.h 275 // positions indicated by the members of the CpuFeature enum from globals.h
271 static uint64_t CpuFeaturesImpliedByPlatform(); 276 static uint64_t CpuFeaturesImpliedByPlatform();
272 277
273 // Returns the double constant NAN 278 // Returns the double constant NAN
274 static double nan_value(); 279 static double nan_value();
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 bool active_; 582 bool active_;
578 PlatformData* data_; // Platform specific data. 583 PlatformData* data_; // Platform specific data.
579 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 584 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
580 }; 585 };
581 586
582 #endif // ENABLE_LOGGING_AND_PROFILING 587 #endif // ENABLE_LOGGING_AND_PROFILING
583 588
584 } } // namespace v8::internal 589 } } // namespace v8::internal
585 590
586 #endif // V8_PLATFORM_H_ 591 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/log-utils.cc ('k') | src/platform-freebsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698