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

Unified Diff: src/v8.cc

Issue 10706002: Implements a new API to set a function entry hook for profiling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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
Index: src/v8.cc
diff --git a/src/v8.cc b/src/v8.cc
index 2910a0700d92223521dddf8a072fc65fb6fa9615..4bfdbfce2c2d389d177a7906d1bc607c0275febf 100644
--- a/src/v8.cc
+++ b/src/v8.cc
@@ -60,6 +60,8 @@ static LazyMutex entropy_mutex = LAZY_MUTEX_INITIALIZER;
static EntropySource entropy_source;
+static uintptr_t profiler_entry_hook = 0;
+
bool V8::Initialize(Deserializer* des) {
FlagList::EnforceFlagImplications();
@@ -164,6 +166,16 @@ void V8::SetReturnAddressLocationResolver(
}
+void V8::SetFunctionEntryHook(uintptr_t entry_hook) {
+ profiler_entry_hook = entry_hook;
+}
+
+
+uintptr_t V8::GetFunctionEntryHook() {
+ return profiler_entry_hook;
+}
+
+
// Used by JavaScript APIs
uint32_t V8::Random(Context* context) {
ASSERT(context->IsGlobalContext());

Powered by Google App Engine
This is Rietveld 408576698