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

Unified Diff: tools/profviz/stdio.js

Issue 17592002: Add v8.log visualizer page. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: small changes Created 7 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
« 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/marking-thread.h b/tools/profviz/stdio.js
similarity index 61%
copy from src/marking-thread.h
copy to tools/profviz/stdio.js
index 9efa3af13262165972abf179defac6f83fed4ac9..e8001494c9df641ffbb0cfce90f618ca729339f0 100644
--- a/src/marking-thread.h
+++ b/tools/profviz/stdio.js
@@ -25,47 +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_MARKING_THREAD_H_
-#define V8_MARKING_THREAD_H_
-
-#include "atomicops.h"
-#include "flags.h"
-#include "platform.h"
-#include "v8utils.h"
-
-#include "spaces.h"
-
-#include "heap.h"
-
-namespace v8 {
-namespace internal {
-
-class MarkingThread : public Thread {
- public:
- explicit MarkingThread(Isolate* isolate);
-
- void Run();
- void Stop();
- void StartMarking();
- void WaitForMarkingThread();
-
- ~MarkingThread() {
- delete start_marking_semaphore_;
- delete end_marking_semaphore_;
- delete stop_semaphore_;
- }
-
- private:
- Isolate* isolate_;
- Heap* heap_;
- Semaphore* start_marking_semaphore_;
- Semaphore* end_marking_semaphore_;
- Semaphore* stop_semaphore_;
- volatile AtomicWord stop_thread_;
- int id_;
- static Atomic32 id_counter_;
-};
-
-} } // namespace v8::internal
-
-#endif // V8_MARKING_THREAD_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