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

Side by Side Diff: Source/devtools/front_end/CPUProfileView.js

Issue 14234008: DevTools: Rename (program) to (native) in CPU profiler. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 /** 586 /**
587 * @param {ProfilerAgent.CPUProfile} profile 587 * @param {ProfilerAgent.CPUProfile} profile
588 */ 588 */
589 _injectIdleTimeNode: function(profile) 589 _injectIdleTimeNode: function(profile)
590 { 590 {
591 var idleTime = profile.idleTime; 591 var idleTime = profile.idleTime;
592 var nodes = profile.head.children; 592 var nodes = profile.head.children;
593 593
594 var programNode = {selfTime: 0}; 594 var programNode = {selfTime: 0};
595 for (var i = nodes.length - 1; i >= 0; --i) { 595 for (var i = nodes.length - 1; i >= 0; --i) {
596 if (nodes[i].functionName === "(program)") { 596 // TODO(alph): Remove (program) after corresponding V8 revision arri ves.
597 if (nodes[i].functionName === "(program)" || nodes[i].functionName = == "(native)") {
597 programNode = nodes[i]; 598 programNode = nodes[i];
598 break; 599 break;
599 } 600 }
600 } 601 }
601 var programTime = programNode.selfTime; 602 var programTime = programNode.selfTime;
602 if (idleTime > programTime) 603 if (idleTime > programTime)
603 idleTime = programTime; 604 idleTime = programTime;
604 programTime = programTime - idleTime; 605 programTime = programTime - idleTime;
605 programNode.selfTime = programTime; 606 programNode.selfTime = programTime;
606 programNode.totalTime = programTime; 607 programNode.totalTime = programTime;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 this.title = file.name; 916 this.title = file.name;
916 this.sidebarElement.subtitle = WebInspector.UIString("Loading\u2026"); 917 this.sidebarElement.subtitle = WebInspector.UIString("Loading\u2026");
917 this.sidebarElement.wait = true; 918 this.sidebarElement.wait = true;
918 919
919 var fileReader = new WebInspector.ChunkedFileReader(file, 10000000, this ); 920 var fileReader = new WebInspector.ChunkedFileReader(file, 10000000, this );
920 fileReader.start(this); 921 fileReader.start(this);
921 }, 922 },
922 923
923 __proto__: WebInspector.ProfileHeader.prototype 924 __proto__: WebInspector.ProfileHeader.prototype
924 } 925 }
OLDNEW
« 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