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

Unified Diff: tools/tickprocessor.js

Issue 2050713002: [--prof] Adding support for RuntimeCallTimerScope based tick separation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: reverting flag changes Created 4 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
« no previous file with comments | « src/log.cc ('k') | tools/tickprocessor-driver.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/tickprocessor.js
diff --git a/tools/tickprocessor.js b/tools/tickprocessor.js
index 5534355f1c8cb791bb8eb0574e4c1c00d7e115aa..ec56d49d9046aa65d9332387fa440b1aab43f2f9 100644
--- a/tools/tickprocessor.js
+++ b/tools/tickprocessor.js
@@ -81,7 +81,8 @@ function TickProcessor(
sourceMap,
timedRange,
pairwiseTimedRange,
- onlySummary) {
+ onlySummary,
+ runtimeTimerFilter) {
LogReader.call(this, {
'shared-library': { parsers: [null, parseInt, parseInt, parseInt],
processor: this.processSharedLibrary },
@@ -94,6 +95,9 @@ function TickProcessor(
processor: this.processCodeDelete },
'sfi-move': { parsers: [parseInt, parseInt],
processor: this.processFunctionMove },
+ 'active-runtime-timer': {
+ parsers: [null],
+ processor: this.processRuntimeTimerEvent },
'tick': {
parsers: [parseInt, parseInt, parseInt,
parseInt, parseInt, 'var-args'],
@@ -124,6 +128,7 @@ function TickProcessor(
this.callGraphSize_ = callGraphSize;
this.ignoreUnknown_ = ignoreUnknown;
this.stateFilter_ = stateFilter;
+ this.runtimeTimerFilter_ = runtimeTimerFilter;
this.sourceMap = sourceMap;
this.deserializedEntriesNames_ = [];
var ticks = this.ticks_ =
@@ -284,9 +289,18 @@ TickProcessor.prototype.processFunctionMove = function(from, to) {
TickProcessor.prototype.includeTick = function(vmState) {
- return this.stateFilter_ == null || this.stateFilter_ == vmState;
+ if (this.stateFilter_ !== null) {
+ return this.stateFilter_ == vmState;
+ } else if (this.runtimeTimerFilter_ !== null) {
+ return this.currentRuntimeTimer == this.runtimeTimerFilter_;
+ }
+ return true;
};
+TickProcessor.prototype.processRuntimeTimerEvent = function(name) {
+ this.currentRuntimeTimer = name;
+}
+
TickProcessor.prototype.processTick = function(pc,
ns_since_start,
is_external_callback,
@@ -781,6 +795,8 @@ function ArgumentsProcessor(args) {
'Show only ticks from OTHER VM state'],
'-e': ['stateFilter', TickProcessor.VmStates.EXTERNAL,
'Show only ticks from EXTERNAL VM state'],
+ '--filter-runtime-timer': ['runtimeTimerFilter', null,
+ 'Show only ticks matching the given runtime timer scope'],
'--call-graph-size': ['callGraphSize', TickProcessor.CALL_GRAPH_SIZE,
'Set the call graph size'],
'--ignore-unknown': ['ignoreUnknown', true,
@@ -832,7 +848,8 @@ ArgumentsProcessor.DEFAULTS = {
distortion: 0,
timedRange: false,
pairwiseTimedRange: false,
- onlySummary: false
+ onlySummary: false,
+ runtimeTimerFilter: null,
};
« no previous file with comments | « src/log.cc ('k') | tools/tickprocessor-driver.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698