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

Unified Diff: tracing/tracing/model/ir_coverage.html

Issue 2083213002: Change call-sites in trace viewer to use generators instead of iteration functions. (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: fix break/continue 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
Index: tracing/tracing/model/ir_coverage.html
diff --git a/tracing/tracing/model/ir_coverage.html b/tracing/tracing/model/ir_coverage.html
index e4bd3d7e53812442dd43d6a8328e02357257fd33..dcdf3443804d477fcd93cdd93b5d4a7e858704fa 100644
--- a/tracing/tracing/model/ir_coverage.html
+++ b/tracing/tracing/model/ir_coverage.html
@@ -28,19 +28,15 @@ tr.exportTo('tr.model', function() {
function getUnassociatedEvents(model, associatedEvents) {
var unassociatedEvents = new tr.model.EventSet();
- model.getAllProcesses().forEach(function(process) {
- for (var tid in process.threads) {
- var thread = process.threads[tid];
- thread.sliceGroup.iterateAllEvents(function(event) {
- // The set of unassociated events contains only events that are not in
- // the set of associated events.
- // Only add event to the set of unassociated events if it is not in
- // the set of associated events.
+ // The set of unassociated events contains only events that are not in
+ // the set of associated events.
+ // Only add event to the set of unassociated events if it is not in
+ // the set of associated events.
charliea (OOO until 10-5) 2016/06/29 18:08:44 nit: bad indentation
alexandermont 2016/06/29 20:47:11 Done
+ for (var proc of model.getAllProcesses())
+ for (var thread of tr.b.dictionaryValues(proc.threads))
+ for (var event of thread.sliceGroup.descendantEvents())
if (!associatedEvents.contains(event))
unassociatedEvents.push(event);
- });
- }
- });
return unassociatedEvents;
}

Powered by Google App Engine
This is Rietveld 408576698