|
void | MaybeWriteStartupBlob (const i::List< i::byte > &snapshot_data, const i::Serializer &serializer, const i::List< i::byte > &context_snapshot_data, const i::Serializer &context_serializer) const |
|
void | WriteSnapshotFile (const i::List< i::byte > &snapshot_data, const i::Serializer &serializer, const i::List< i::byte > &context_snapshot_data, const i::Serializer &context_serializer) const |
|
void | WriteFilePrefix () const |
|
void | WriteFileSuffix () const |
|
void | WriteData (const char *prefix, const i::List< i::byte > &source_data, FILE *raw_file) const |
|
void | MaybeWriteRawFile (const i::List< i::byte > *data, FILE *raw_file) const |
|
void | WriteData (const char *prefix, const i::List< i::byte > &source_data, const i::List< i::byte > *data_to_be_written) const |
|
void | WriteMeta (const char *prefix, const i::Serializer &ser) const |
|
void | WriteSizeVar (const i::Serializer &ser, const char *prefix, const char *name, int space) const |
|
void | WriteSnapshotData (const i::List< i::byte > *data) const |
|
FILE * | GetFileDescriptorOrDie (const char *filename) |
|
Definition at line 35 of file mksnapshot.cc.
◆ SnapshotWriter()
SnapshotWriter::SnapshotWriter |
( |
const char * |
snapshot_file | ) |
|
|
inlineexplicit |
Definition at line 37 of file mksnapshot.cc.
FILE * GetFileDescriptorOrDie(const char *filename)
FILE * startup_blob_file_
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
◆ ~SnapshotWriter()
SnapshotWriter::~SnapshotWriter |
( |
| ) |
|
|
inline |
◆ GetFileDescriptorOrDie()
FILE* SnapshotWriter::GetFileDescriptorOrDie |
( |
const char * |
filename | ) |
|
|
inlineprivate |
◆ MaybeWriteRawFile()
void SnapshotWriter::MaybeWriteRawFile |
( |
const i::List< i::byte > * |
data, |
|
|
FILE * |
raw_file |
|
) |
| const |
|
inlineprivate |
◆ MaybeWriteStartupBlob()
Definition at line 77 of file mksnapshot.cc.
93 sink.PutBlob(snapshot_bytes, snapshot_data.length(),
"snapshot");
98 sink.PutBlob(context_bytes, context_snapshot_data.length(),
"context");
103 size_t written = fwrite(startup_blob.
begin(), 1, startup_blob.length(),
105 if (written != (
size_t)startup_blob.length()) {
106 i::PrintF(
"Writing snapshot file failed.. Aborting.\n");
int CurrentAllocationAddress(int space) const
References arraysize, v8::internal::List< T, AllocationPolicy >::begin(), v8::internal::CELL_SPACE, v8::internal::CODE_SPACE, v8::internal::Serializer::CurrentAllocationAddress(), v8::internal::LO_SPACE, v8::internal::MAP_SPACE, v8::internal::NEW_SPACE, v8::internal::OLD_DATA_SPACE, v8::internal::OLD_POINTER_SPACE, v8::internal::PrintF(), v8::internal::PROPERTY_CELL_SPACE, v8::internal::SnapshotByteSink::PutBlob(), and v8::internal::SnapshotByteSink::PutInt().
◆ SetCompressor()
void SnapshotWriter::SetCompressor |
( |
Compressor * |
compressor | ) |
|
|
inline |
◆ SetRawFiles()
void SnapshotWriter::SetRawFiles |
( |
const char * |
raw_file, |
|
|
const char * |
raw_context_file |
|
) |
| |
|
inline |
◆ SetStartupBlobFile()
void SnapshotWriter::SetStartupBlobFile |
( |
const char * |
startup_blob_file | ) |
|
|
inline |
◆ WriteData() [1/2]
void SnapshotWriter::WriteData |
( |
const char * |
prefix, |
|
|
const i::List< i::byte > & |
source_data, |
|
|
const i::List< i::byte > * |
data_to_be_written |
|
) |
| const |
|
inlineprivate |
Definition at line 171 of file mksnapshot.cc.
173 fprintf(
fp_,
"const byte Snapshot::%sdata_[] = {\n", prefix);
175 fprintf(
fp_,
"};\n");
176 fprintf(
fp_,
"const int Snapshot::%ssize_ = %d;\n", prefix,
177 data_to_be_written->length());
179 if (data_to_be_written == &source_data) {
180 fprintf(
fp_,
"const byte* Snapshot::%sraw_data_ = Snapshot::%sdata_;\n",
182 fprintf(
fp_,
"const int Snapshot::%sraw_size_ = Snapshot::%ssize_;\n",
185 fprintf(
fp_,
"const byte* Snapshot::%sraw_data_ = NULL;\n", prefix);
186 fprintf(
fp_,
"const int Snapshot::%sraw_size_ = %d;\n",
187 prefix, source_data.length());
void WriteSnapshotData(const i::List< i::byte > *data) const
◆ WriteData() [2/2]
void SnapshotWriter::WriteData |
( |
const char * |
prefix, |
|
|
const i::List< i::byte > & |
source_data, |
|
|
FILE * |
raw_file |
|
) |
| const |
|
inlineprivate |
Definition at line 137 of file mksnapshot.cc.
142 data_to_be_written = &source_data;
145 data_to_be_written = &compressed_data;
147 i::PrintF(
"Compression failed. Aborting.\n");
151 DCHECK(data_to_be_written);
153 WriteData(prefix, source_data, data_to_be_written);
virtual i::Vector< i::byte > * output()=0
virtual bool Compress(i::Vector< i::byte > input)=0
void WriteData(const char *prefix, const i::List< i::byte > &source_data, FILE *raw_file) const
void MaybeWriteRawFile(const i::List< i::byte > *data, FILE *raw_file) const
void AddAll(const List< T, AllocationPolicy > &other, AllocationPolicy allocator=AllocationPolicy())
Vector< T > ToVector() const
References v8::internal::List< T, AllocationPolicy >::AddAll(), DCHECK, NULL, v8::internal::PrintF(), and v8::internal::List< T, AllocationPolicy >::ToVector().
◆ WriteFilePrefix()
void SnapshotWriter::WriteFilePrefix |
( |
| ) |
const |
|
inlineprivate |
Definition at line 123 of file mksnapshot.cc.
124 fprintf(
fp_,
"// Autogenerated snapshot file. Do not edit.\n\n");
125 fprintf(
fp_,
"#include \"src/v8.h\"\n");
126 fprintf(
fp_,
"#include \"src/base/platform/platform.h\"\n\n");
127 fprintf(
fp_,
"#include \"src/snapshot.h\"\n\n");
128 fprintf(
fp_,
"namespace v8 {\n");
129 fprintf(
fp_,
"namespace internal {\n\n");
◆ WriteFileSuffix()
void SnapshotWriter::WriteFileSuffix |
( |
| ) |
const |
|
inlineprivate |
Definition at line 132 of file mksnapshot.cc.
133 fprintf(
fp_,
"} // namespace internal\n");
134 fprintf(
fp_,
"} // namespace v8\n");
◆ WriteMeta()
void SnapshotWriter::WriteMeta |
( |
const char * |
prefix, |
|
|
const i::Serializer & |
ser |
|
) |
| const |
|
inlineprivate |
Definition at line 192 of file mksnapshot.cc.
void WriteSizeVar(const i::Serializer &ser, const char *prefix, const char *name, int space) const
References v8::internal::CELL_SPACE, v8::internal::CODE_SPACE, v8::internal::LO_SPACE, v8::internal::MAP_SPACE, v8::internal::NEW_SPACE, v8::internal::OLD_DATA_SPACE, v8::internal::OLD_POINTER_SPACE, and v8::internal::PROPERTY_CELL_SPACE.
◆ WriteSizeVar()
void SnapshotWriter::WriteSizeVar |
( |
const i::Serializer & |
ser, |
|
|
const char * |
prefix, |
|
|
const char * |
name, |
|
|
int |
space |
|
) |
| const |
|
inlineprivate |
Definition at line 204 of file mksnapshot.cc.
206 fprintf(
fp_,
"const int Snapshot::%s%s_space_used_ = %d;\n",
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
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 space(in MBytes)
References v8::internal::Serializer::CurrentAllocationAddress(), name, and space().
◆ WriteSnapshot()
Definition at line 66 of file mksnapshot.cc.
71 context_snapshot_data, context_serializer);
73 context_snapshot_data, context_serializer);
void WriteSnapshotFile(const i::List< i::byte > &snapshot_data, const i::Serializer &serializer, const i::List< i::byte > &context_snapshot_data, const i::Serializer &context_serializer) const
void MaybeWriteStartupBlob(const i::List< i::byte > &snapshot_data, const i::Serializer &serializer, const i::List< i::byte > &context_snapshot_data, const i::Serializer &context_serializer) const
Referenced by main().
◆ WriteSnapshotData()
void SnapshotWriter::WriteSnapshotData |
( |
const i::List< i::byte > * |
data | ) |
const |
|
inlineprivate |
◆ WriteSnapshotFile()
Definition at line 111 of file mksnapshot.cc.
118 WriteMeta(
"context_", context_serializer);
void WriteFilePrefix() const
void WriteFileSuffix() const
void WriteMeta(const char *prefix, const i::Serializer &ser) const
◆ compressor_
◆ fp_
FILE* SnapshotWriter::fp_ |
|
private |
◆ raw_context_file_
FILE* SnapshotWriter::raw_context_file_ |
|
private |
◆ raw_file_
FILE* SnapshotWriter::raw_file_ |
|
private |
◆ startup_blob_file_
FILE* SnapshotWriter::startup_blob_file_ |
|
private |
The documentation for this class was generated from the following file: