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

Unified Diff: tools/profviz/stdio.js

Issue 142813003: A64: Synchronize with r15358. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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
« no previous file with comments | « tools/profviz/profviz.js ('k') | tools/profviz/worker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/profviz/stdio.js
diff --git a/src/a64/debugger-a64.h b/tools/profviz/stdio.js
similarity index 61%
copy from src/a64/debugger-a64.h
copy to tools/profviz/stdio.js
index 50480cc268a49f53fafc1650e79d73de573524ed..e8001494c9df641ffbb0cfce90f618ca729339f0 100644
--- a/src/a64/debugger-a64.h
+++ b/tools/profviz/stdio.js
@@ -25,32 +25,28 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef V8_A64_DEBUGGER_A64_H_
-#define V8_A64_DEBUGGER_A64_H_
-
-#if defined(USE_SIMULATOR)
-
-#include "globals.h"
-#include "utils.h"
-#include "a64/constants-a64.h"
-#include "a64/simulator-a64.h"
-
-namespace v8 {
-namespace internal {
-
-
-class Debugger : public Simulator {
- public:
- Debugger(Decoder* decoder, FILE* stream = stdout)
- : Simulator(decoder, NULL, stream) {}
-
- // Functions overloading.
- void VisitException(Instruction* instr);
-};
-
-
-} } // namespace v8::internal
-
-#endif // USE_SIMULATOR
-
-#endif // V8_A64_DEBUGGER_A64_H_
+var processor = new ArgumentsProcessor(arguments);
+var distortion_per_entry = 0;
+var range_start_override = undefined;
+var range_end_override = undefined;
+
+if (!processor.parse()) processor.printUsageAndExit();;
+var result = processor.result();
+var distortion = parseInt(result.distortion);
+if (isNaN(distortion)) processor.printUsageAndExit();;
+// Convert picoseconds to milliseconds.
+distortion_per_entry = distortion / 1000000;
+var rangelimits = result.range.split(",");
+var range_start = parseInt(rangelimits[0]);
+var range_end = parseInt(rangelimits[1]);
+if (!isNaN(range_start)) range_start_override = range_start;
+if (!isNaN(range_end)) range_end_override = range_end;
+
+var kResX = 1600;
+var kResY = 600;
+var psc = new PlotScriptComposer(kResX, kResY);
+psc.collectData(readline, distortion_per_entry);
+psc.findPlotRange(range_start_override, range_end_override);
+print("set terminal pngcairo size " + kResX + "," + kResY +
+ " enhanced font 'Helvetica,10'");
+psc.assembleOutput(print);
« no previous file with comments | « tools/profviz/profviz.js ('k') | tools/profviz/worker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698