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

Unified Diff: runtime/vm/regexp_assembler_bytecode.cc

Issue 1969453002: Timeline event for compiling irregexp bytecode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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: runtime/vm/regexp_assembler_bytecode.cc
diff --git a/runtime/vm/regexp_assembler_bytecode.cc b/runtime/vm/regexp_assembler_bytecode.cc
index 9586aea84b2a07e0f0f2a84b1e3c81c6f65794f3..986c0e30fcc658f0ea5205bb0131a8084c578f74 100644
--- a/runtime/vm/regexp_assembler_bytecode.cc
+++ b/runtime/vm/regexp_assembler_bytecode.cc
@@ -12,6 +12,7 @@
#include "vm/regexp.h"
#include "vm/regexp_parser.h"
#include "vm/regexp_interpreter.h"
+#include "vm/timeline.h"
namespace dart {
@@ -460,6 +461,13 @@ static intptr_t Prepare(const RegExp& regexp,
if (regexp.bytecode(is_one_byte) == TypedData::null()) {
const String& pattern = String::Handle(zone, regexp.pattern());
+ NOT_IN_PRODUCT(TimelineDurationScope tds(Thread::Current(),
+ Timeline::GetCompilerStream(),
+ "CompileIrregexpBytecode");
+ if (tds.enabled()) {
+ tds.SetNumArguments(1);
+ tds.CopyArgument(0, "pattern", pattern.ToCString());
+ }); // !PRODUCT
const bool multiline = regexp.is_multi_line();
RegExpCompileData* compile_data = new(zone) RegExpCompileData();
« 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