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

Side by Side Diff: src/d8.cc

Issue 43273004: Allow redirecting disassembly and deoptimization traces into a file. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « src/codegen.cc ('k') | src/deoptimizer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 return 0; 1561 return 0;
1562 } 1562 }
1563 1563
1564 1564
1565 #ifdef V8_SHARED 1565 #ifdef V8_SHARED
1566 static void SetStandaloneFlagsViaCommandLine() { 1566 static void SetStandaloneFlagsViaCommandLine() {
1567 int fake_argc = 2; 1567 int fake_argc = 2;
1568 char **fake_argv = new char*[2]; 1568 char **fake_argv = new char*[2];
1569 fake_argv[0] = NULL; 1569 fake_argv[0] = NULL;
1570 fake_argv[1] = strdup("--trace-hydrogen-file=hydrogen.cfg"); 1570 fake_argv[1] = strdup("--trace-hydrogen-file=hydrogen.cfg");
1571 fake_argv[2] = strdup("--redirect-code-traces-to=code.asm");
1571 v8::V8::SetFlagsFromCommandLine(&fake_argc, fake_argv, false); 1572 v8::V8::SetFlagsFromCommandLine(&fake_argc, fake_argv, false);
1572 free(fake_argv[1]); 1573 free(fake_argv[1]);
1573 delete[] fake_argv; 1574 delete[] fake_argv;
1574 } 1575 }
1575 #endif 1576 #endif
1576 1577
1577 1578
1578 #ifndef V8_SHARED 1579 #ifndef V8_SHARED
1579 static void DumpHeapConstants(i::Isolate* isolate) { 1580 static void DumpHeapConstants(i::Isolate* isolate) {
1580 i::Heap* heap = isolate->heap(); 1581 i::Heap* heap = isolate->heap();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1650 #endif 1651 #endif
1651 } 1652 }
1652 }; 1653 };
1653 1654
1654 1655
1655 int Shell::Main(int argc, char* argv[]) { 1656 int Shell::Main(int argc, char* argv[]) {
1656 if (!SetOptions(argc, argv)) return 1; 1657 if (!SetOptions(argc, argv)) return 1;
1657 v8::V8::InitializeICU(); 1658 v8::V8::InitializeICU();
1658 #ifndef V8_SHARED 1659 #ifndef V8_SHARED
1659 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; 1660 i::FLAG_trace_hydrogen_file = "hydrogen.cfg";
1661 i::FLAG_redirect_code_traces_to = "code.asm";
1660 #else 1662 #else
1661 SetStandaloneFlagsViaCommandLine(); 1663 SetStandaloneFlagsViaCommandLine();
1662 #endif 1664 #endif
1663 v8::SetDefaultResourceConstraintsForCurrentPlatform(); 1665 v8::SetDefaultResourceConstraintsForCurrentPlatform();
1664 ShellArrayBufferAllocator array_buffer_allocator; 1666 ShellArrayBufferAllocator array_buffer_allocator;
1665 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); 1667 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator);
1666 int result = 0; 1668 int result = 0;
1667 Isolate* isolate = Isolate::GetCurrent(); 1669 Isolate* isolate = Isolate::GetCurrent();
1668 DumbLineEditor dumb_line_editor(isolate); 1670 DumbLineEditor dumb_line_editor(isolate);
1669 { 1671 {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1738 } 1740 }
1739 1741
1740 } // namespace v8 1742 } // namespace v8
1741 1743
1742 1744
1743 #ifndef GOOGLE3 1745 #ifndef GOOGLE3
1744 int main(int argc, char* argv[]) { 1746 int main(int argc, char* argv[]) {
1745 return v8::Shell::Main(argc, argv); 1747 return v8::Shell::Main(argc, argv);
1746 } 1748 }
1747 #endif 1749 #endif
OLDNEW
« no previous file with comments | « src/codegen.cc ('k') | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698