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

Unified Diff: src/api.cc

Issue 422593003: Initial GetSample implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Moved thread logic out of GetSample Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8.h ('k') | src/cpu-profiler.h » ('j') | src/sampler.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 7c484de53ee1e537a8abeefdce1e0cab69e4952e..d19969ae9ceddf8cebcc07b05348a6b335ebc53b 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -9,6 +9,7 @@
#include <sanitizer/asan_interface.h>
#endif // V8_USE_ADDRESS_SANITIZER
#include <cmath> // For isnan.
+#include "include/v8.h"
#include "include/v8-debug.h"
#include "include/v8-profiler.h"
#include "include/v8-testing.h"
@@ -30,6 +31,7 @@
#include "src/heap-snapshot-generator-inl.h"
#include "src/icu_util.h"
#include "src/json-parser.h"
+#include "src/log.h"
#include "src/messages.h"
#include "src/natives.h"
#include "src/parser.h"
@@ -6706,6 +6708,22 @@ void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) {
}
+#if V8_OS_POSIX && !V8_OS_CYGWIN
+
+void Isolate::GetSample(Sample* sample) {
+ i::Sampler::GetSample(sample);
+}
+
+#elif V8_OS_WIN || V8_OS_CYGWIN
+
+void Isolate::GetSample(const CONTEXT& context, Sample* sample) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
+ i::Sampler::GetSample(isolate, context, sample);
+}
+
+#endif
+
+
void Isolate::SetEventLogger(LogEventCallback that) {
// Do not overwrite the event logger if we want to log explicitly.
if (i::FLAG_log_timer_events) return;
« no previous file with comments | « include/v8.h ('k') | src/cpu-profiler.h » ('j') | src/sampler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698