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

Unified Diff: tools/profile.js

Issue 1179173009: Add support for running the profiler output processing scripts with node. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Passed a missing type arg through to CodeEntry Created 5 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: tools/profile.js
diff --git a/tools/profile.js b/tools/profile.js
index f0814a2f0d9cc3303cf5ae8f5633058a1e7243cd..85981f85c29cc65602ee0c246c6992f040d22bbd 100644
--- a/tools/profile.js
+++ b/tools/profile.js
@@ -25,6 +25,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Node imports
+if (typeof module !== 'undefined' && module.exports) {
+ CodeMap = require('./codemap');
+ ConsArray = require('./consarray');
+}
/**
* Creates a profile object for processing profiling-related events
@@ -399,7 +404,6 @@ Profile.prototype.getFlatProfile = function(opt_label) {
return counters;
};
-
Jakob Kummerow 2015/06/19 09:43:53 keep this line
mattloring 2015/06/19 17:29:03 Done.
Profile.CEntryNode = function(name, ticks) {
this.name = name;
this.ticks = ticks;
@@ -832,3 +836,8 @@ CallTree.Node.prototype.descendToChild = function(
}
return curr;
};
+
+// Node exports
+if (typeof module !== 'undefined' && module.exports) {
+ module.exports = Profile;
+}
« no previous file with comments | « tools/logreader.js ('k') | tools/profile_view.js » ('j') | tools/tickprocessor.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698