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

Unified Diff: src/log.cc

Issue 1809203007: Linux perf integration with the new support for JIT. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes Created 4 years, 9 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 | « src/log.h ('k') | src/log-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index e520ff6aed04aada83d0aacf5b0231ca36bef32f..b1262d6d2a5ceff36f367aba658b83bbdb8804bf 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -18,6 +18,7 @@
#include "src/log-inl.h"
#include "src/log-utils.h"
#include "src/macro-assembler.h"
+#include "src/perf-jit.h"
#include "src/profiler/cpu-profiler.h"
#include "src/runtime-profiler.h"
#include "src/string-stream.h"
@@ -730,19 +731,18 @@ void Profiler::Run() {
//
Logger::Logger(Isolate* isolate)
- : isolate_(isolate),
- ticker_(NULL),
- profiler_(NULL),
- log_events_(NULL),
- is_logging_(false),
- log_(new Log(this)),
- perf_basic_logger_(NULL),
- ll_logger_(NULL),
- jit_logger_(NULL),
- listeners_(5),
- is_initialized_(false) {
-}
-
+ : isolate_(isolate),
+ ticker_(NULL),
+ profiler_(NULL),
+ log_events_(NULL),
+ is_logging_(false),
+ log_(new Log(this)),
+ perf_basic_logger_(NULL),
+ perf_jit_logger_(NULL),
+ ll_logger_(NULL),
+ jit_logger_(NULL),
+ listeners_(5),
+ is_initialized_(false) {}
Logger::~Logger() {
delete log_;
@@ -1786,6 +1786,11 @@ bool Logger::SetUp(Isolate* isolate) {
addCodeEventListener(perf_basic_logger_);
}
+ if (FLAG_perf_prof) {
+ perf_jit_logger_ = new PerfJitLogger();
+ addCodeEventListener(perf_jit_logger_);
+ }
+
if (FLAG_ll_prof) {
ll_logger_ = new LowLevelLogger(log_file_name.str().c_str());
addCodeEventListener(ll_logger_);
@@ -1854,6 +1859,12 @@ FILE* Logger::TearDown() {
perf_basic_logger_ = NULL;
}
+ if (perf_jit_logger_) {
+ removeCodeEventListener(perf_jit_logger_);
+ delete perf_jit_logger_;
+ perf_jit_logger_ = NULL;
+ }
+
if (ll_logger_) {
removeCodeEventListener(ll_logger_);
delete ll_logger_;
« no previous file with comments | « src/log.h ('k') | src/log-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698