OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 "use strict" | 5 "use strict" |
6 | 6 |
7 function $(id) { | 7 function $(id) { |
8 return document.getElementById(id); | 8 return document.getElementById(id); |
9 } | 9 } |
10 | 10 |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 { value : "none", text : "None" } | 519 { value : "none", text : "None" } |
520 ], calltree.categories); | 520 ], calltree.categories); |
521 addOptions(this.selectSort, [ | 521 addOptions(this.selectSort, [ |
522 { value : "time", text : "Time (including children)" }, | 522 { value : "time", text : "Time (including children)" }, |
523 { value : "category-time", text : "Code category, time" }, | 523 { value : "category-time", text : "Code category, time" }, |
524 ], calltree.sort); | 524 ], calltree.sort); |
525 return; | 525 return; |
526 case "top-down": | 526 case "top-down": |
527 addOptions(this.selectAttribution, attributions, calltree.attribution); | 527 addOptions(this.selectAttribution, attributions, calltree.attribution); |
528 addOptions(this.selectCategories, [ | 528 addOptions(this.selectCategories, [ |
529 { value : "none", text : "None" } | 529 { value : "none", text : "None" }, |
| 530 { value : "rt-entry", text : "Runtime entries" } |
530 ], calltree.categories); | 531 ], calltree.categories); |
531 addOptions(this.selectSort, [ | 532 addOptions(this.selectSort, [ |
532 { value : "time", text : "Time (including children)" }, | 533 { value : "time", text : "Time (including children)" }, |
533 { value : "own-time", text : "Own time" }, | 534 { value : "own-time", text : "Own time" }, |
534 { value : "category-time", text : "Code category, time" }, | 535 { value : "category-time", text : "Code category, time" }, |
535 { value : "category-own-time", text : "Code category, own time"} | 536 { value : "category-own-time", text : "Code category, own time"} |
536 ], calltree.sort); | 537 ], calltree.sort); |
537 return; | 538 return; |
538 case "function-list": | 539 case "function-list": |
539 addOptions(this.selectAttribution, attributions, calltree.attribution); | 540 addOptions(this.selectAttribution, attributions, calltree.attribution); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 let ownTimeClass = (mode === "bottom-up") ? "numeric-hidden" : "numeric"; | 599 let ownTimeClass = (mode === "bottom-up") ? "numeric-hidden" : "numeric"; |
599 let ownTimeTh = $(this.treeElement.id + "-own-time-header"); | 600 let ownTimeTh = $(this.treeElement.id + "-own-time-header"); |
600 ownTimeTh.classList = ownTimeClass; | 601 ownTimeTh.classList = ownTimeClass; |
601 let ownTicksTh = $(this.treeElement.id + "-own-ticks-header"); | 602 let ownTicksTh = $(this.treeElement.id + "-own-ticks-header"); |
602 ownTicksTh.classList = ownTimeClass; | 603 ownTicksTh.classList = ownTimeClass; |
603 | 604 |
604 // Build the tree. | 605 // Build the tree. |
605 let stackProcessor; | 606 let stackProcessor; |
606 let filter = filterFromFilterId(this.currentState.callTree.attribution); | 607 let filter = filterFromFilterId(this.currentState.callTree.attribution); |
607 if (mode === "top-down") { | 608 if (mode === "top-down") { |
608 stackProcessor = | 609 if (this.currentState.callTree.categories === "rt-entry") { |
609 new PlainCallTreeProcessor(filter, false); | 610 stackProcessor = |
| 611 new RuntimeCallTreeProcessor(); |
| 612 } else { |
| 613 stackProcessor = |
| 614 new PlainCallTreeProcessor(filter, false); |
| 615 } |
610 } else if (mode === "function-list") { | 616 } else if (mode === "function-list") { |
611 stackProcessor = new FunctionListTree( | 617 stackProcessor = new FunctionListTree( |
612 filter, this.currentState.callTree.categories === "code-type"); | 618 filter, this.currentState.callTree.categories === "code-type"); |
613 | 619 |
614 } else { | 620 } else { |
615 console.assert(mode === "bottom-up"); | 621 console.assert(mode === "bottom-up"); |
616 if (this.currentState.callTree.categories == "none") { | 622 if (this.currentState.callTree.categories == "none") { |
617 stackProcessor = | 623 stackProcessor = |
618 new PlainCallTreeProcessor(filter, true); | 624 new PlainCallTreeProcessor(filter, true); |
619 } else { | 625 } else { |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1225 | 1231 |
1226 class HelpView { | 1232 class HelpView { |
1227 constructor() { | 1233 constructor() { |
1228 this.element = $("help"); | 1234 this.element = $("help"); |
1229 } | 1235 } |
1230 | 1236 |
1231 render(newState) { | 1237 render(newState) { |
1232 this.element.style.display = newState.file ? "none" : "inherit"; | 1238 this.element.style.display = newState.file ? "none" : "inherit"; |
1233 } | 1239 } |
1234 } | 1240 } |
OLD | NEW |