V8 Project
v8::internal::PerfBasicLogger Class Reference
+ Inheritance diagram for v8::internal::PerfBasicLogger:
+ Collaboration diagram for v8::internal::PerfBasicLogger:

Public Member Functions

 PerfBasicLogger ()
 
virtual ~PerfBasicLogger ()
 
virtual void CodeMoveEvent (Address from, Address to)
 
virtual void CodeDisableOptEvent (Code *code, SharedFunctionInfo *shared)
 
virtual void CodeDeleteEvent (Address from)
 
- Public Member Functions inherited from v8::internal::CodeEventLogger
 CodeEventLogger ()
 
virtual ~CodeEventLogger ()
 
virtual void CodeCreateEvent (Logger::LogEventsAndTags tag, Code *code, const char *comment)
 
virtual void CodeCreateEvent (Logger::LogEventsAndTags tag, Code *code, Name *name)
 
virtual void CodeCreateEvent (Logger::LogEventsAndTags tag, Code *code, int args_count)
 
virtual void CodeCreateEvent (Logger::LogEventsAndTags tag, Code *code, SharedFunctionInfo *shared, CompilationInfo *info, Name *name)
 
virtual void CodeCreateEvent (Logger::LogEventsAndTags tag, Code *code, SharedFunctionInfo *shared, CompilationInfo *info, Name *source, int line, int column)
 
virtual void RegExpCodeCreateEvent (Code *code, String *source)
 
virtual void CallbackEvent (Name *name, Address entry_point)
 
virtual void GetterCallbackEvent (Name *name, Address entry_point)
 
virtual void SetterCallbackEvent (Name *name, Address entry_point)
 
virtual void SharedFunctionInfoMoveEvent (Address from, Address to)
 
virtual void CodeMovingGCEvent ()
 
- Public Member Functions inherited from v8::internal::CodeEventListener
virtual ~CodeEventListener ()
 

Private Member Functions

virtual void LogRecordedBuffer (Code *code, SharedFunctionInfo *shared, const char *name, int length)
 

Private Attributes

FILE * perf_output_handle_
 

Static Private Attributes

static const char kFilenameFormatString [] = "/tmp/perf-%d.map"
 
static const int kFilenameBufferPadding = 16
 
static const int kLogBufferSize = 2 * MB
 

Detailed Description

Definition at line 229 of file log.cc.

Constructor & Destructor Documentation

◆ PerfBasicLogger()

v8::internal::PerfBasicLogger::PerfBasicLogger ( )

Definition at line 259 of file log.cc.

261  // Open the perf JIT dump file.
262  int bufferSize = sizeof(kFilenameFormatString) + kFilenameBufferPadding;
263  ScopedVector<char> perf_dump_name(bufferSize);
264  int size = SNPrintF(
265  perf_dump_name,
268  CHECK_NE(size, -1);
270  base::OS::FOpen(perf_dump_name.start(), base::OS::LogFileOpenMode);
272  setvbuf(perf_output_handle_, NULL, _IOFBF, kLogBufferSize);
273 }
static const char *const LogFileOpenMode
Definition: platform.h:187
static FILE * FOpen(const char *path, const char *mode)
static int GetCurrentProcessId()
static const int kLogBufferSize
Definition: log.cc:250
static const char kFilenameFormatString[]
Definition: log.cc:245
static const int kFilenameBufferPadding
Definition: log.cc:246
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define CHECK_NE(unexpected, value)
Definition: logging.h:173
int SNPrintF(Vector< char > str, const char *format,...)
Definition: utils.cc:105

References CHECK_NE, v8::base::OS::FOpen(), v8::base::OS::GetCurrentProcessId(), kFilenameBufferPadding, kFilenameFormatString, kLogBufferSize, v8::base::OS::LogFileOpenMode, NULL, perf_output_handle_, size, v8::internal::SNPrintF(), and v8::internal::Vector< T >::start().

+ Here is the call graph for this function:

◆ ~PerfBasicLogger()

v8::internal::PerfBasicLogger::~PerfBasicLogger ( )
virtual

Definition at line 276 of file log.cc.

276  {
277  fclose(perf_output_handle_);
279 }

References NULL, and perf_output_handle_.

Member Function Documentation

◆ CodeDeleteEvent()

virtual void v8::internal::PerfBasicLogger::CodeDeleteEvent ( Address  from)
inlinevirtual

Implements v8::internal::CodeEventListener.

Definition at line 236 of file log.cc.

236 { }

◆ CodeDisableOptEvent()

virtual void v8::internal::PerfBasicLogger::CodeDisableOptEvent ( Code code,
SharedFunctionInfo shared 
)
inlinevirtual

Implements v8::internal::CodeEventListener.

Definition at line 235 of file log.cc.

235 { }

◆ CodeMoveEvent()

virtual void v8::internal::PerfBasicLogger::CodeMoveEvent ( Address  from,
Address  to 
)
inlinevirtual

Implements v8::internal::CodeEventListener.

Definition at line 234 of file log.cc.

234 { }

◆ LogRecordedBuffer()

void v8::internal::PerfBasicLogger::LogRecordedBuffer ( Code code,
SharedFunctionInfo shared,
const char *  name,
int  length 
)
privatevirtual

Implements v8::internal::CodeEventLogger.

Definition at line 282 of file log.cc.

285  {
286  DCHECK(code->instruction_start() == code->address() + Code::kHeaderSize);
287 
288  base::OS::FPrint(perf_output_handle_, "%llx %x %.*s\n",
289  reinterpret_cast<uint64_t>(code->instruction_start()),
290  code->instruction_size(), length, name);
291 }
static void FPrint(FILE *out, const char *format,...)
static const int kHeaderSize
Definition: objects.h:5373
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
#define DCHECK(condition)
Definition: logging.h:205

References v8::internal::HeapObject::address(), DCHECK, v8::base::OS::FPrint(), v8::internal::Code::instruction_size(), v8::internal::Code::instruction_start(), v8::internal::Code::kHeaderSize, name, and perf_output_handle_.

+ Here is the call graph for this function:

Member Data Documentation

◆ kFilenameBufferPadding

const int v8::internal::PerfBasicLogger::kFilenameBufferPadding = 16
staticprivate

Definition at line 246 of file log.cc.

Referenced by PerfBasicLogger().

◆ kFilenameFormatString

const char v8::internal::PerfBasicLogger::kFilenameFormatString = "/tmp/perf-%d.map"
staticprivate

Definition at line 245 of file log.cc.

Referenced by PerfBasicLogger().

◆ kLogBufferSize

const int v8::internal::PerfBasicLogger::kLogBufferSize = 2 * MB
staticprivate

Definition at line 250 of file log.cc.

Referenced by PerfBasicLogger().

◆ perf_output_handle_

FILE* v8::internal::PerfBasicLogger::perf_output_handle_
private

Definition at line 252 of file log.cc.

Referenced by LogRecordedBuffer(), PerfBasicLogger(), and ~PerfBasicLogger().


The documentation for this class was generated from the following file: