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

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

Issue 23609064: Make "three snapshot technique" work on heap snapshots loaded from files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 return new WebInspector.CPUProfileHeader(this, profile.title, profile.ui d); 742 return new WebInspector.CPUProfileHeader(this, profile.title, profile.ui d);
743 }, 743 },
744 744
745 /** 745 /**
746 * @override 746 * @override
747 * @param {!WebInspector.ProfileHeader} profile 747 * @param {!WebInspector.ProfileHeader} profile
748 */ 748 */
749 removeProfile: function(profile) 749 removeProfile: function(profile)
750 { 750 {
751 WebInspector.ProfileType.prototype.removeProfile.call(this, profile); 751 WebInspector.ProfileType.prototype.removeProfile.call(this, profile);
752 if (!profile.isTemporary) 752 if (!profile.isTemporary && !profile.fromFile())
753 ProfilerAgent.removeProfile(this.id, profile.uid); 753 ProfilerAgent.removeProfile(this.id, profile.uid);
754 }, 754 },
755 755
756 /** 756 /**
757 * @override 757 * @override
758 * @param {function(this:WebInspector.ProfileType, ?string, Array.<ProfilerA gent.ProfileHeader>)} populateCallback 758 * @param {function(this:WebInspector.ProfileType, ?string, Array.<ProfilerA gent.ProfileHeader>)} populateCallback
759 */ 759 */
760 _requestProfilesFromBackend: function(populateCallback) 760 _requestProfilesFromBackend: function(populateCallback)
761 { 761 {
762 ProfilerAgent.getProfileHeaders(populateCallback); 762 ProfilerAgent.getProfileHeaders(populateCallback);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 function onOpen() 912 function onOpen()
913 { 913 {
914 ProfilerAgent.getCPUProfile(this.uid, getCPUProfileCallback.bind(thi s)); 914 ProfilerAgent.getCPUProfile(this.uid, getCPUProfileCallback.bind(thi s));
915 } 915 }
916 916
917 this._fileName = this._fileName || "CPU-" + new Date().toISO8601Compact( ) + this._profileType.fileExtension(); 917 this._fileName = this._fileName || "CPU-" + new Date().toISO8601Compact( ) + this._profileType.fileExtension();
918 fileOutputStream.open(this._fileName, onOpen.bind(this)); 918 fileOutputStream.open(this._fileName, onOpen.bind(this));
919 }, 919 },
920 920
921 /** 921 /**
922 * @param {File} file 922 * @param {!File} file
923 */ 923 */
924 loadFromFile: function(file) 924 loadFromFile: function(file)
925 { 925 {
926 this.title = file.name;
927 this.sidebarElement.subtitle = WebInspector.UIString("Loading\u2026"); 926 this.sidebarElement.subtitle = WebInspector.UIString("Loading\u2026");
928 this.sidebarElement.wait = true; 927 this.sidebarElement.wait = true;
929 928
930 var fileReader = new WebInspector.ChunkedFileReader(file, 10000000, this ); 929 var fileReader = new WebInspector.ChunkedFileReader(file, 10000000, this );
931 fileReader.start(this); 930 fileReader.start(this);
932 }, 931 },
933 932
934 __proto__: WebInspector.ProfileHeader.prototype 933 __proto__: WebInspector.ProfileHeader.prototype
935 } 934 }
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorProfilerAgent.cpp ('k') | Source/devtools/front_end/HeapSnapshot.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698