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

Side by Side Diff: tracing/tracing/model/model.html

Issue 1996303002: [Tracing] Introduce Frame Data Side Panel (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Respond to ROI; Merge Frame and FTN 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/base.html"> 8 <link rel="import" href="/tracing/base/base.html">
9 <link rel="import" href="/tracing/base/event.html"> 9 <link rel="import" href="/tracing/base/event.html">
10 <link rel="import" href="/tracing/base/interval_tree.html"> 10 <link rel="import" href="/tracing/base/interval_tree.html">
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 551
552 applyObjectRefPatchups: function() { 552 applyObjectRefPatchups: function() {
553 // Change all the fields pointing at id_refs to their real values. 553 // Change all the fields pointing at id_refs to their real values.
554 var unresolved = []; 554 var unresolved = [];
555 this.patchupsToApply_.forEach(function(patchup) { 555 this.patchupsToApply_.forEach(function(patchup) {
556 if (patchup.pidRef in this.processes) { 556 if (patchup.pidRef in this.processes) {
557 var snapshot = this.processes[patchup.pidRef].objects.getSnapshotAt( 557 var snapshot = this.processes[patchup.pidRef].objects.getSnapshotAt(
558 patchup.scopedId, patchup.ts); 558 patchup.scopedId, patchup.ts);
559 if (snapshot) { 559 if (snapshot) {
560 patchup.object[patchup.field] = snapshot; 560 patchup.object[patchup.field] = snapshot;
561 // TODO(xiaochengh): Find a saner approach.
562 if (snapshot instanceof tr.e.chrome.BlameContextSnapshot) {
petrcermak 2016/05/24 10:54:10 Maybe you could use `snapshot.eventSet !== undefin
Xiaocheng 2016/05/25 10:17:47 This part is rewritten by adding a callback |Objec
563 if (patchup.item.duration)
petrcermak 2016/05/24 10:54:10 Just checking: Is it intended that this is false e
Xiaocheng 2016/05/25 10:17:47 Good catch. The intention is to add only slices, s
564 snapshot.eventSet.push(patchup.item);
565 }
561 return; 566 return;
562 } 567 }
563 } 568 }
564 unresolved.push(patchup); 569 unresolved.push(patchup);
565 }, this); 570 }, this);
566 this.patchupsToApply_ = unresolved; 571 this.patchupsToApply_ = unresolved;
567 }, 572 },
568 573
569 replacePIDRefsInPatchups: function(old_pid_ref, new_pid_ref) { 574 replacePIDRefsInPatchups: function(old_pid_ref, new_pid_ref) {
570 this.patchupsToApply_.forEach(function(patchup) { 575 this.patchupsToApply_.forEach(function(patchup) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 653
649 var scope = fieldValue.scope || tr.model.OBJECT_DEFAULT_SCOPE; 654 var scope = fieldValue.scope || tr.model.OBJECT_DEFAULT_SCOPE;
650 var idRef = fieldValue.id_ref || fieldValue.idRef; 655 var idRef = fieldValue.id_ref || fieldValue.idRef;
651 var scopedId = new tr.model.ScopedId(scope, idRef); 656 var scopedId = new tr.model.ScopedId(scope, idRef);
652 var pidRef = fieldValue.pid_ref || fieldValue.pidRef || pid; 657 var pidRef = fieldValue.pid_ref || fieldValue.pidRef || pid;
653 var ts = item[itemTimestampField]; 658 var ts = item[itemTimestampField];
654 // We have to delay the actual change to the new value until after all 659 // We have to delay the actual change to the new value until after all
655 // refs have been located. Otherwise, we could end up recursing in 660 // refs have been located. Otherwise, we could end up recursing in
656 // ways we definitely didn't intend. 661 // ways we definitely didn't intend.
657 patchupsToApply.push({ 662 patchupsToApply.push({
663 item: item,
658 object: object, 664 object: object,
659 field: fieldName, 665 field: fieldName,
660 pidRef: pidRef, 666 pidRef: pidRef,
661 scopedId: scopedId, 667 scopedId: scopedId,
662 ts: ts}); 668 ts: ts});
663 } 669 }
664 function iterObjectFieldsRecursively(object) { 670 function iterObjectFieldsRecursively(object) {
665 if (!(object instanceof Object)) 671 if (!(object instanceof Object))
666 return; 672 return;
667 673
(...skipping 20 matching lines...) Expand all
688 iterObjectFieldsRecursively(item.args); 694 iterObjectFieldsRecursively(item.args);
689 iterObjectFieldsRecursively(item.contexts); 695 iterObjectFieldsRecursively(item.contexts);
690 } 696 }
691 }; 697 };
692 698
693 return { 699 return {
694 Model: Model 700 Model: Model
695 }; 701 };
696 }); 702 });
697 </script> 703 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698