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

Unified Diff: src/runtime.cc

Issue 450011: Add pause / resume profiling commands to debugger protocol. (Closed)
Patch Set: Created 11 years, 1 month 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 | « src/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index b7ddd0c8445115095fa7b62e7ec9307c5b3f35e5..6a5a7f02099debcb6e27e1a30608b9362a71697e 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -7691,8 +7691,31 @@ static Object* Runtime_FunctionGetInferredName(Arguments args) {
CONVERT_CHECKED(JSFunction, f, args[0]);
return f->shared()->inferred_name();
}
+
#endif // ENABLE_DEBUGGER_SUPPORT
+#ifdef ENABLE_LOGGING_AND_PROFILING
+
+static Object* Runtime_ProfilerResume(Arguments args) {
+ NoHandleAllocation ha;
+ ASSERT(args.length() == 1);
+
+ CONVERT_CHECKED(Smi, smi_modules, args[0]);
+ Logger::ResumeProfiler(smi_modules->value());
+ return Heap::undefined_value();
+}
+
+
+static Object* Runtime_ProfilerPause(Arguments args) {
+ NoHandleAllocation ha;
+ ASSERT(args.length() == 1);
+
+ CONVERT_CHECKED(Smi, smi_modules, args[0]);
+ Logger::PauseProfiler(smi_modules->value());
+ return Heap::undefined_value();
+}
+
+#endif // ENABLE_LOGGING_AND_PROFILING
// Finds the script object from the script data. NOTE: This operation uses
// heap traversal to find the function generated for the source position
« no previous file with comments | « src/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698