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

Unified Diff: test/cctest/trace-extension.cc

Issue 857953002: ensure trace extension works from optimized code when profiler is not enabled (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/trace-extension.cc
diff --git a/test/cctest/trace-extension.cc b/test/cctest/trace-extension.cc
index 0a1ff87d1cb2bcad27f7d9dfcd6c12a263b1ccb0..a090e52f87c7b44e5a1a5ecda22bad1862e0ada5 100644
--- a/test/cctest/trace-extension.cc
+++ b/test/cctest/trace-extension.cc
@@ -28,6 +28,7 @@
#include "test/cctest/trace-extension.h"
#include "src/sampler.h"
+#include "src/vm-state-inl.h"
#include "test/cctest/cctest.h"
namespace v8 {
@@ -97,6 +98,11 @@ void TraceExtension::DoTrace(Address fp) {
void TraceExtension::Trace(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate());
+ i::VMState<EXTERNAL> state(isolate);
+ Address address = reinterpret_cast<Address>(
+ reinterpret_cast<intptr_t>(&TraceExtension::Trace));
+ i::ExternalCallbackScope call_scope(isolate, address);
DoTrace(GetFP(args));
}
@@ -114,6 +120,11 @@ static void DoTraceHideCEntryFPAddress(Address fp) {
void TraceExtension::JSTrace(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate());
+ i::VMState<EXTERNAL> state(isolate);
+ Address address = reinterpret_cast<Address>(
+ reinterpret_cast<intptr_t>(&TraceExtension::JSTrace));
+ i::ExternalCallbackScope call_scope(isolate, address);
DoTraceHideCEntryFPAddress(GetFP(args));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698