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

Unified Diff: src/compiler/basic-block-profiler.h

Issue 593563005: [turbofan] basic block profiler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/basic-block-profiler.cc » ('j') | src/compiler/basic-block-profiler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/basic-block-profiler.h
diff --git a/src/compiler/basic-block-profiler.h b/src/compiler/basic-block-profiler.h
new file mode 100644
index 0000000000000000000000000000000000000000..6669f9e1592bfe8ad5ca34671f3a12ef12f9803c
--- /dev/null
+++ b/src/compiler/basic-block-profiler.h
@@ -0,0 +1,68 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_BASIC_BLOCK_PROFILER_H_
+#define V8_COMPILER_BASIC_BLOCK_PROFILER_H_
+
+#include <list>
+
+#include "src/v8.h"
+
+namespace v8 {
+namespace internal {
+
+class CompilationInfo;
+
+namespace compiler {
+
+class Schedule;
+class Graph;
+
+class BasicBlockProfiler {
+ public:
+ class Data {
+ public:
+ void SetCode(Handle<Code> code);
+
+ private:
+ friend class BasicBlockProfiler;
+
+ Data(int n_blocks, int* block_ids, uint32_t* counts,
+ OStringStream* function_name, OStringStream* schedule_stream);
+ ~Data();
+
+ void DumpProfilingData();
+ void ResetCounts();
+
+ const int n_blocks_;
+ int* const block_ids_;
+ uint32_t* const counts_;
+ OStringStream* const function_name_;
+ OStringStream* const schedule_stream_;
+ OStringStream* code_stream_;
+ DISALLOW_COPY_AND_ASSIGN(Data);
+ };
+
+ BasicBlockProfiler();
+ ~BasicBlockProfiler();
+
+ Data* Profile(CompilationInfo* info, Graph* graph, Schedule* schedule);
titzer 2014/09/23 14:14:09 I think "Instrument" is a better name here.
+
+ void DumpProfilingData();
+ void ResetCounts();
+
+ private:
+ void TearDown();
+
+ typedef std::list<Data*> DataList;
+ DataList data_list_;
+
+ DISALLOW_COPY_AND_ASSIGN(BasicBlockProfiler);
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_COMPILER_BASIC_BLOCK_PROFILER_H_
« no previous file with comments | « no previous file | src/compiler/basic-block-profiler.cc » ('j') | src/compiler/basic-block-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698