Commit 7da7c0bd authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[logger] Start cleaning up Logger class

- Use unique ptrs for owned objects
- Remove friendship with CpuProfiler and replace with public API
- Remove unused method LogFailure()
- Remove StopProfiler() which was only used by LogFailure() (removed)
  and one test, which can use StopProfilerThread() instead
- Remove 'paused' state which was only used by the above
- Remove 'engage' state. There is no reason we need this as along as
  users keep track of Engage/Disengage calls

Drive-by cleanup:
- Remove import of log.h from profile-generator.h
- Remove unnecessary includes of log.h

Change-Id: Ifc4ca156bef038c40953f8361ffea17788e3a59b
Reviewed-on: https://chromium-review.googlesource.com/c/1424338
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58957}
parent f77299e1
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "src/heap/factory.h" #include "src/heap/factory.h"
#include "src/interface-descriptors.h" #include "src/interface-descriptors.h"
#include "src/isolate-inl.h" #include "src/isolate-inl.h"
#include "src/log-inl.h" #include "src/log.h"
#include "src/objects/heap-number.h" #include "src/objects/heap-number.h"
#include "src/optimized-compilation-info.h" #include "src/optimized-compilation-info.h"
#include "src/tracing/trace-event.h" #include "src/tracing/trace-event.h"
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "src/interpreter/bytecode-array-iterator.h" #include "src/interpreter/bytecode-array-iterator.h"
#include "src/interpreter/interpreter.h" #include "src/interpreter/interpreter.h"
#include "src/isolate-inl.h" #include "src/isolate-inl.h"
#include "src/log.h"
#include "src/message-template.h" #include "src/message-template.h"
#include "src/objects/api-callbacks-inl.h" #include "src/objects/api-callbacks-inl.h"
#include "src/objects/debug-objects-inl.h" #include "src/objects/debug-objects-inl.h"
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "src/counters-inl.h" #include "src/counters-inl.h"
#include "src/interpreter/bytecode-generator.h" #include "src/interpreter/bytecode-generator.h"
#include "src/interpreter/bytecodes.h" #include "src/interpreter/bytecodes.h"
#include "src/log.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/objects/shared-function-info.h" #include "src/objects/shared-function-info.h"
#include "src/objects/slots.h" #include "src/objects/slots.h"
......
...@@ -780,9 +780,6 @@ class Profiler: public base::Thread { ...@@ -780,9 +780,6 @@ class Profiler: public base::Thread {
// Inserts collected profiling data into buffer. // Inserts collected profiling data into buffer.
void Insert(v8::TickSample* sample) { void Insert(v8::TickSample* sample) {
if (paused_)
return;
if (Succ(head_) == static_cast<int>(base::Relaxed_Load(&tail_))) { if (Succ(head_) == static_cast<int>(base::Relaxed_Load(&tail_))) {
overflow_ = true; overflow_ = true;
} else { } else {
...@@ -794,10 +791,6 @@ class Profiler: public base::Thread { ...@@ -794,10 +791,6 @@ class Profiler: public base::Thread {
void Run() override; void Run() override;
// Pause and Resume TickSample data collection.
void Pause() { paused_ = true; }
void Resume() { paused_ = false; }
private: private:
// Waits for a signal and removes profiling data. // Waits for a signal and removes profiling data.
bool Remove(v8::TickSample* sample) { bool Remove(v8::TickSample* sample) {
...@@ -824,14 +817,8 @@ class Profiler: public base::Thread { ...@@ -824,14 +817,8 @@ class Profiler: public base::Thread {
// Semaphore used for buffer synchronization. // Semaphore used for buffer synchronization.
base::Semaphore buffer_semaphore_; base::Semaphore buffer_semaphore_;
// Tells whether profiler is engaged, that is, processing thread is stated.
bool engaged_;
// Tells whether worker thread should continue running. // Tells whether worker thread should continue running.
base::Atomic32 running_; base::Atomic32 running_;
// Tells whether we are currently recording tick samples.
bool paused_;
}; };
...@@ -843,12 +830,11 @@ class Ticker: public sampler::Sampler { ...@@ -843,12 +830,11 @@ class Ticker: public sampler::Sampler {
public: public:
Ticker(Isolate* isolate, int interval_microseconds) Ticker(Isolate* isolate, int interval_microseconds)
: sampler::Sampler(reinterpret_cast<v8::Isolate*>(isolate)), : sampler::Sampler(reinterpret_cast<v8::Isolate*>(isolate)),
profiler_(nullptr), sampling_thread_(
sampling_thread_(new SamplingThread(this, interval_microseconds)) {} base::make_unique<SamplingThread>(this, interval_microseconds)) {}
~Ticker() override { ~Ticker() override {
if (IsActive()) Stop(); if (IsActive()) Stop();
delete sampling_thread_;
} }
void SetProfiler(Profiler* profiler) { void SetProfiler(Profiler* profiler) {
...@@ -873,8 +859,8 @@ class Ticker: public sampler::Sampler { ...@@ -873,8 +859,8 @@ class Ticker: public sampler::Sampler {
} }
private: private:
Profiler* profiler_; Profiler* profiler_ = nullptr;
SamplingThread* sampling_thread_; std::unique_ptr<SamplingThread> sampling_thread_;
}; };
// //
...@@ -885,18 +871,12 @@ Profiler::Profiler(Isolate* isolate) ...@@ -885,18 +871,12 @@ Profiler::Profiler(Isolate* isolate)
isolate_(isolate), isolate_(isolate),
head_(0), head_(0),
overflow_(false), overflow_(false),
buffer_semaphore_(0), buffer_semaphore_(0) {
engaged_(false),
paused_(false) {
base::Relaxed_Store(&tail_, 0); base::Relaxed_Store(&tail_, 0);
base::Relaxed_Store(&running_, 0); base::Relaxed_Store(&running_, 0);
} }
void Profiler::Engage() { void Profiler::Engage() {
if (engaged_) return;
engaged_ = true;
std::vector<base::OS::SharedLibraryAddress> addresses = std::vector<base::OS::SharedLibraryAddress> addresses =
base::OS::GetSharedLibraryAddresses(); base::OS::GetSharedLibraryAddresses();
for (const auto& address : addresses) { for (const auto& address : addresses) {
...@@ -917,8 +897,6 @@ void Profiler::Engage() { ...@@ -917,8 +897,6 @@ void Profiler::Engage() {
void Profiler::Disengage() { void Profiler::Disengage() {
if (!engaged_) return;
// Stop receiving ticks. // Stop receiving ticks.
isolate_->logger()->ticker_->ClearProfiler(); isolate_->logger()->ticker_->ClearProfiler();
...@@ -927,8 +905,6 @@ void Profiler::Disengage() { ...@@ -927,8 +905,6 @@ void Profiler::Disengage() {
// the thread to terminate. // the thread to terminate.
base::Relaxed_Store(&running_, 0); base::Relaxed_Store(&running_, 0);
v8::TickSample sample; v8::TickSample sample;
// Reset 'paused_' flag, otherwise semaphore may not be signalled.
Resume();
Insert(&sample); Insert(&sample);
Join(); Join();
...@@ -952,15 +928,9 @@ void Profiler::Run() { ...@@ -952,15 +928,9 @@ void Profiler::Run() {
Logger::Logger(Isolate* isolate) Logger::Logger(Isolate* isolate)
: isolate_(isolate), : isolate_(isolate),
ticker_(nullptr),
profiler_(nullptr),
log_events_(nullptr), log_events_(nullptr),
is_logging_(false), is_logging_(false),
log_(nullptr), log_(nullptr),
perf_basic_logger_(nullptr),
perf_jit_logger_(nullptr),
ll_logger_(nullptr),
jit_logger_(nullptr),
is_initialized_(false), is_initialized_(false),
existing_code_logger_(isolate) {} existing_code_logger_(isolate) {}
...@@ -1427,13 +1397,13 @@ void CodeLinePosEvent(JitLogger* jit_logger, Address code_start, ...@@ -1427,13 +1397,13 @@ void CodeLinePosEvent(JitLogger* jit_logger, Address code_start,
void Logger::CodeLinePosInfoRecordEvent(Address code_start, void Logger::CodeLinePosInfoRecordEvent(Address code_start,
ByteArray source_position_table) { ByteArray source_position_table) {
SourcePositionTableIterator iter(source_position_table); SourcePositionTableIterator iter(source_position_table);
CodeLinePosEvent(jit_logger_, code_start, iter); CodeLinePosEvent(jit_logger_.get(), code_start, iter);
} }
void Logger::CodeLinePosInfoRecordEvent( void Logger::CodeLinePosInfoRecordEvent(
Address code_start, Vector<const byte> source_position_table) { Address code_start, Vector<const byte> source_position_table) {
SourcePositionTableIterator iter(source_position_table); SourcePositionTableIterator iter(source_position_table);
CodeLinePosEvent(jit_logger_, code_start, iter); CodeLinePosEvent(jit_logger_.get(), code_start, iter);
} }
void Logger::CodeNameEvent(Address addr, int pos, const char* code_name) { void Logger::CodeNameEvent(Address addr, int pos, const char* code_name) {
...@@ -1722,21 +1692,6 @@ void Logger::MapDetails(Map map) { ...@@ -1722,21 +1692,6 @@ void Logger::MapDetails(Map map) {
msg.WriteToLogFile(); msg.WriteToLogFile();
} }
void Logger::StopProfiler() {
if (!log_->IsEnabled()) return;
if (profiler_ != nullptr) {
profiler_->Pause();
is_logging_ = false;
RemoveCodeEventListener(this);
}
}
// This function can be called when Log's mutex is acquired,
// either from main or Profiler's thread.
void Logger::LogFailure() {
StopProfiler();
}
static void AddFunctionAndCode(SharedFunctionInfo sfi, AbstractCode code_object, static void AddFunctionAndCode(SharedFunctionInfo sfi, AbstractCode code_object,
Handle<SharedFunctionInfo>* sfis, Handle<SharedFunctionInfo>* sfis,
Handle<AbstractCode>* code_objects, int offset) { Handle<AbstractCode>* code_objects, int offset) {
...@@ -1929,21 +1884,21 @@ bool Logger::SetUp(Isolate* isolate) { ...@@ -1929,21 +1884,21 @@ bool Logger::SetUp(Isolate* isolate) {
log_ = new Log(this, log_file_name.str().c_str()); log_ = new Log(this, log_file_name.str().c_str());
if (FLAG_perf_basic_prof) { if (FLAG_perf_basic_prof) {
perf_basic_logger_ = new PerfBasicLogger(isolate); perf_basic_logger_.reset(new PerfBasicLogger(isolate));
AddCodeEventListener(perf_basic_logger_); AddCodeEventListener(perf_basic_logger_.get());
} }
if (FLAG_perf_prof) { if (FLAG_perf_prof) {
perf_jit_logger_ = new PerfJitLogger(isolate); perf_jit_logger_.reset(new PerfJitLogger(isolate));
AddCodeEventListener(perf_jit_logger_); AddCodeEventListener(perf_jit_logger_.get());
} }
if (FLAG_ll_prof) { if (FLAG_ll_prof) {
ll_logger_ = new LowLevelLogger(isolate, log_file_name.str().c_str()); ll_logger_.reset(new LowLevelLogger(isolate, log_file_name.str().c_str()));
AddCodeEventListener(ll_logger_); AddCodeEventListener(ll_logger_.get());
} }
ticker_ = new Ticker(isolate, FLAG_prof_sampling_interval); ticker_.reset(new Ticker(isolate, FLAG_prof_sampling_interval));
if (Log::InitLogAtStart()) { if (Log::InitLogAtStart()) {
is_logging_ = true; is_logging_ = true;
...@@ -1952,7 +1907,7 @@ bool Logger::SetUp(Isolate* isolate) { ...@@ -1952,7 +1907,7 @@ bool Logger::SetUp(Isolate* isolate) {
timer_.Start(); timer_.Start();
if (FLAG_prof_cpp) { if (FLAG_prof_cpp) {
profiler_ = new Profiler(isolate); profiler_.reset(new Profiler(isolate));
is_logging_ = true; is_logging_ = true;
profiler_->Engage(); profiler_->Engage();
} }
...@@ -1968,14 +1923,13 @@ bool Logger::SetUp(Isolate* isolate) { ...@@ -1968,14 +1923,13 @@ bool Logger::SetUp(Isolate* isolate) {
void Logger::SetCodeEventHandler(uint32_t options, void Logger::SetCodeEventHandler(uint32_t options,
JitCodeEventHandler event_handler) { JitCodeEventHandler event_handler) {
if (jit_logger_) { if (jit_logger_) {
RemoveCodeEventListener(jit_logger_); RemoveCodeEventListener(jit_logger_.get());
delete jit_logger_; jit_logger_.reset();
jit_logger_ = nullptr;
} }
if (event_handler) { if (event_handler) {
jit_logger_ = new JitLogger(isolate_, event_handler); jit_logger_.reset(new JitLogger(isolate_, event_handler));
AddCodeEventListener(jit_logger_); AddCodeEventListener(jit_logger_.get());
if (options & kJitCodeEventEnumExisting) { if (options & kJitCodeEventEnumExisting) {
HandleScope scope(isolate_); HandleScope scope(isolate_);
LogCodeObjects(); LogCodeObjects();
...@@ -1984,15 +1938,12 @@ void Logger::SetCodeEventHandler(uint32_t options, ...@@ -1984,15 +1938,12 @@ void Logger::SetCodeEventHandler(uint32_t options,
} }
} }
sampler::Sampler* Logger::sampler() { sampler::Sampler* Logger::sampler() { return ticker_.get(); }
return ticker_;
}
void Logger::StopProfilerThread() { void Logger::StopProfilerThread() {
if (profiler_ != nullptr) { if (profiler_ != nullptr) {
profiler_->Disengage(); profiler_->Disengage();
delete profiler_; profiler_.reset();
profiler_ = nullptr;
} }
} }
...@@ -2003,31 +1954,26 @@ FILE* Logger::TearDown() { ...@@ -2003,31 +1954,26 @@ FILE* Logger::TearDown() {
// Stop the profiler thread before closing the file. // Stop the profiler thread before closing the file.
StopProfilerThread(); StopProfilerThread();
delete ticker_; ticker_.reset();
ticker_ = nullptr;
if (perf_basic_logger_) { if (perf_basic_logger_) {
RemoveCodeEventListener(perf_basic_logger_); RemoveCodeEventListener(perf_basic_logger_.get());
delete perf_basic_logger_; perf_basic_logger_.reset();
perf_basic_logger_ = nullptr;
} }
if (perf_jit_logger_) { if (perf_jit_logger_) {
RemoveCodeEventListener(perf_jit_logger_); RemoveCodeEventListener(perf_jit_logger_.get());
delete perf_jit_logger_; perf_jit_logger_.reset();
perf_jit_logger_ = nullptr;
} }
if (ll_logger_) { if (ll_logger_) {
RemoveCodeEventListener(ll_logger_); RemoveCodeEventListener(ll_logger_.get());
delete ll_logger_; ll_logger_.reset();
ll_logger_ = nullptr;
} }
if (jit_logger_) { if (jit_logger_) {
RemoveCodeEventListener(jit_logger_); RemoveCodeEventListener(jit_logger_.get());
delete jit_logger_; jit_logger_.reset();
jit_logger_ = nullptr;
} }
return log_->Close(); return log_->Close();
......
...@@ -257,14 +257,13 @@ class Logger : public CodeEventListener { ...@@ -257,14 +257,13 @@ class Logger : public CodeEventListener {
return is_logging_; return is_logging_;
} }
// Used by CpuProfiler. TODO(petermarshall): Untangle
void set_is_logging(bool new_value) { is_logging_ = new_value; }
bool is_listening_to_code_events() override { bool is_listening_to_code_events() override {
return is_logging() || jit_logger_ != nullptr; return is_logging() || jit_logger_ != nullptr;
} }
// Stop collection of profiling data.
// When data collection is paused, CPU Tick events are discarded.
void StopProfiler();
void LogExistingFunction(Handle<SharedFunctionInfo> shared, void LogExistingFunction(Handle<SharedFunctionInfo> shared,
Handle<AbstractCode> code); Handle<AbstractCode> code);
// Logs all compiled functions found in the heap. // Logs all compiled functions found in the heap.
...@@ -280,9 +279,6 @@ class Logger : public CodeEventListener { ...@@ -280,9 +279,6 @@ class Logger : public CodeEventListener {
V8_INLINE static CodeEventListener::LogEventsAndTags ToNativeByScript( V8_INLINE static CodeEventListener::LogEventsAndTags ToNativeByScript(
CodeEventListener::LogEventsAndTags, Script); CodeEventListener::LogEventsAndTags, Script);
// Callback from Log, stops profiling in case of insufficient resources.
void LogFailure();
// Used for logging stubs found in the snapshot. // Used for logging stubs found in the snapshot.
void LogCodeObject(Object code_object); void LogCodeObject(Object code_object);
...@@ -321,12 +317,12 @@ class Logger : public CodeEventListener { ...@@ -321,12 +317,12 @@ class Logger : public CodeEventListener {
Isolate* isolate_; Isolate* isolate_;
// The sampler used by the profiler and the sliding state window. // The sampler used by the profiler and the sliding state window.
Ticker* ticker_; std::unique_ptr<Ticker> ticker_;
// When the statistical profile is active, profiler_ // When the statistical profile is active, profiler_
// points to a Profiler, that handles collection // points to a Profiler, that handles collection
// of samples. // of samples.
Profiler* profiler_; std::unique_ptr<Profiler> profiler_;
// An array of log events names. // An array of log events names.
const char* const* log_events_; const char* const* log_events_;
...@@ -342,10 +338,10 @@ class Logger : public CodeEventListener { ...@@ -342,10 +338,10 @@ class Logger : public CodeEventListener {
bool is_logging_; bool is_logging_;
Log* log_; Log* log_;
PerfBasicLogger* perf_basic_logger_; std::unique_ptr<PerfBasicLogger> perf_basic_logger_;
PerfJitLogger* perf_jit_logger_; std::unique_ptr<PerfJitLogger> perf_jit_logger_;
LowLevelLogger* ll_logger_; std::unique_ptr<LowLevelLogger> ll_logger_;
JitLogger* jit_logger_; std::unique_ptr<JitLogger> jit_logger_;
std::set<int> logged_source_code_; std::set<int> logged_source_code_;
uint32_t next_source_info_id_ = 0; uint32_t next_source_info_id_ = 0;
...@@ -356,8 +352,6 @@ class Logger : public CodeEventListener { ...@@ -356,8 +352,6 @@ class Logger : public CodeEventListener {
ExistingCodeLogger existing_code_logger_; ExistingCodeLogger existing_code_logger_;
base::ElapsedTimer timer_; base::ElapsedTimer timer_;
friend class CpuProfiler;
}; };
#define TIMER_EVENTS_LIST(V) \ #define TIMER_EVENTS_LIST(V) \
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "src/deoptimizer.h" #include "src/deoptimizer.h"
#include "src/frames-inl.h" #include "src/frames-inl.h"
#include "src/locked-queue-inl.h" #include "src/locked-queue-inl.h"
#include "src/log-inl.h" #include "src/log.h"
#include "src/profiler/cpu-profiler-inl.h" #include "src/profiler/cpu-profiler-inl.h"
#include "src/vm-state-inl.h" #include "src/vm-state-inl.h"
...@@ -369,8 +369,8 @@ void CpuProfiler::StartProcessorIfNotStarted() { ...@@ -369,8 +369,8 @@ void CpuProfiler::StartProcessorIfNotStarted() {
} }
Logger* logger = isolate_->logger(); Logger* logger = isolate_->logger();
// Disable logging when using the new implementation. // Disable logging when using the new implementation.
saved_is_logging_ = logger->is_logging_; saved_is_logging_ = logger->is_logging();
logger->is_logging_ = false; logger->set_is_logging(false);
bool codemap_needs_initialization = false; bool codemap_needs_initialization = false;
if (!generator_) { if (!generator_) {
...@@ -423,7 +423,7 @@ void CpuProfiler::StopProcessor() { ...@@ -423,7 +423,7 @@ void CpuProfiler::StopProcessor() {
logger->RemoveCodeEventListener(profiler_listener_.get()); logger->RemoveCodeEventListener(profiler_listener_.get());
processor_->StopSynchronously(); processor_->StopSynchronously();
processor_.reset(); processor_.reset();
logger->is_logging_ = saved_is_logging_; logger->set_is_logging(saved_is_logging_);
} }
......
...@@ -88,20 +88,22 @@ base::LazyDynamicInstance<CodeEntry, ...@@ -88,20 +88,22 @@ base::LazyDynamicInstance<CodeEntry,
CodeEntry::kUnresolvedEntry = LAZY_DYNAMIC_INSTANCE_INITIALIZER; CodeEntry::kUnresolvedEntry = LAZY_DYNAMIC_INSTANCE_INITIALIZER;
CodeEntry* CodeEntry::ProgramEntryCreateTrait::Create() { CodeEntry* CodeEntry::ProgramEntryCreateTrait::Create() {
return new CodeEntry(Logger::FUNCTION_TAG, CodeEntry::kProgramEntryName); return new CodeEntry(CodeEventListener::FUNCTION_TAG,
CodeEntry::kProgramEntryName);
} }
CodeEntry* CodeEntry::IdleEntryCreateTrait::Create() { CodeEntry* CodeEntry::IdleEntryCreateTrait::Create() {
return new CodeEntry(Logger::FUNCTION_TAG, CodeEntry::kIdleEntryName); return new CodeEntry(CodeEventListener::FUNCTION_TAG,
CodeEntry::kIdleEntryName);
} }
CodeEntry* CodeEntry::GCEntryCreateTrait::Create() { CodeEntry* CodeEntry::GCEntryCreateTrait::Create() {
return new CodeEntry(Logger::BUILTIN_TAG, return new CodeEntry(CodeEventListener::BUILTIN_TAG,
CodeEntry::kGarbageCollectorEntryName); CodeEntry::kGarbageCollectorEntryName);
} }
CodeEntry* CodeEntry::UnresolvedEntryCreateTrait::Create() { CodeEntry* CodeEntry::UnresolvedEntryCreateTrait::Create() {
return new CodeEntry(Logger::FUNCTION_TAG, return new CodeEntry(CodeEventListener::FUNCTION_TAG,
CodeEntry::kUnresolvedFunctionName); CodeEntry::kUnresolvedFunctionName);
} }
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
#include "include/v8-profiler.h" #include "include/v8-profiler.h"
#include "src/allocation.h" #include "src/allocation.h"
#include "src/log.h" #include "src/builtins/builtins.h"
#include "src/code-events.h"
#include "src/profiler/strings-storage.h" #include "src/profiler/strings-storage.h"
#include "src/source-position.h" #include "src/source-position.h"
...@@ -194,7 +195,7 @@ class CodeEntry { ...@@ -194,7 +195,7 @@ class CodeEntry {
static base::LazyDynamicInstance<CodeEntry, UnresolvedEntryCreateTrait>::type static base::LazyDynamicInstance<CodeEntry, UnresolvedEntryCreateTrait>::type
kUnresolvedEntry; kUnresolvedEntry;
using TagField = BitField<Logger::LogEventsAndTags, 0, 8>; using TagField = BitField<CodeEventListener::LogEventsAndTags, 0, 8>;
using BuiltinIdField = BitField<Builtins::Name, 8, 23>; using BuiltinIdField = BitField<Builtins::Name, 8, 23>;
using UsedField = BitField<bool, 31, 1>; using UsedField = BitField<bool, 31, 1>;
...@@ -337,6 +338,7 @@ class ProfileTree { ...@@ -337,6 +338,7 @@ class ProfileTree {
DISALLOW_COPY_AND_ASSIGN(ProfileTree); DISALLOW_COPY_AND_ASSIGN(ProfileTree);
}; };
class CpuProfiler;
class CpuProfile { class CpuProfile {
public: public:
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "src/api-inl.h" #include "src/api-inl.h"
#include "src/disassembler.h" #include "src/disassembler.h"
#include "src/isolate.h" #include "src/isolate.h"
#include "src/log.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/v8.h" #include "src/v8.h"
#include "src/vm-state-inl.h" #include "src/vm-state-inl.h"
......
...@@ -458,7 +458,7 @@ TEST(EquivalenceOfLoggingAndTraversal) { ...@@ -458,7 +458,7 @@ TEST(EquivalenceOfLoggingAndTraversal) {
" obj.test =\n" " obj.test =\n"
" (function a(j) { return function b() { return j; } })(100);\n" " (function a(j) { return function b() { return j; } })(100);\n"
"})(this);"); "})(this);");
logger.logger()->StopProfiler(); logger.logger()->StopProfilerThread();
CcTest::PreciseCollectAllGarbage(); CcTest::PreciseCollectAllGarbage();
logger.StringEvent("test-logging-done", ""); logger.StringEvent("test-logging-done", "");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment