[vm] Rename clustered_snapshot.h/cc to app_snapshot.h/cc.

Since bbefc05748, both serialization formats in the VM are based on clustering. The distinguishing feature of the older clustered serializer is that it represents apps/programs rather than messages.

TEST=ci
Change-Id: If3185c21c6aadeec61a940b12ba23d17f2752761
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211501
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
Ryan Macnak 2021-09-16 00:13:34 +00:00 committed by commit-bot@chromium.org
parent 3409b2a0e8
commit d89e42bef5
14 changed files with 22 additions and 22 deletions

View file

@ -266,7 +266,7 @@ Snapshots-with-code work almost in the same way as normal snapshots with a minor
![Snapshots](images/snapshot-with-code.png)
!!! sourcecode "Source to read"
@{runtime/vm/clustered_snapshot.cc} handles serialization and deserialization of snapshots. A family of API functions `Dart_CreateXyzSnapshot[AsAssembly]` are responsible for writing out snapshots of the heap (e.g. @{Dart_CreateAppJITSnapshotAsBlobs} and @{Dart_CreateAppAOTSnapshotAsAssembly}). On the other hand @{Dart_CreateIsolateGroup} optionally takes snapshot data to start an isolate from.
@{runtime/vm/app_snapshot.cc} handles serialization and deserialization of snapshots. A family of API functions `Dart_CreateXyzSnapshot[AsAssembly]` are responsible for writing out snapshots of the heap (e.g. @{Dart_CreateAppJITSnapshotAsBlobs} and @{Dart_CreateAppAOTSnapshotAsAssembly}). On the other hand @{Dart_CreateIsolateGroup} optionally takes snapshot data to start an isolate from.
### Running from AppJIT snapshots
@ -390,4 +390,4 @@ Finally if the number of checks in the linear array grows past threshold the cal
## TODO
1. Document the difference between CoreJIT and AppJIT snapshots.
2. Document that switchable calls are used in the unoptimized code as well.
2. Document that switchable calls are used in the unoptimized code as well.

View file

@ -5,7 +5,7 @@
#include <memory>
#include <utility>
#include "vm/clustered_snapshot.h"
#include "vm/app_snapshot.h"
#include "platform/assert.h"
#include "vm/bootstrap.h"

View file

@ -2,8 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#ifndef RUNTIME_VM_CLUSTERED_SNAPSHOT_H_
#define RUNTIME_VM_CLUSTERED_SNAPSHOT_H_
#ifndef RUNTIME_VM_APP_SNAPSHOT_H_
#define RUNTIME_VM_APP_SNAPSHOT_H_
#include "platform/assert.h"
#include "vm/allocation.h"
@ -820,4 +820,4 @@ class FullSnapshotReader {
} // namespace dart
#endif // RUNTIME_VM_CLUSTERED_SNAPSHOT_H_
#endif // RUNTIME_VM_APP_SNAPSHOT_H_

View file

@ -15,7 +15,7 @@
#include "platform/globals.h"
#include "platform/utils.h"
#include "vm/clustered_snapshot.h"
#include "vm/app_snapshot.h"
#include "vm/dart_api_impl.h"
#include "vm/datastream.h"
#include "vm/message_snapshot.h"

View file

@ -582,7 +582,7 @@ void FlowGraphCompiler::EmitMegamorphicInstanceCall(
if (FLAG_precompiled_mode) {
if (FLAG_use_bare_instructions) {
// The AOT runtime will replace the slot in the object pool with the
// entrypoint address - see clustered_snapshot.cc.
// entrypoint address - see app_snapshot.cc.
CLOBBERS_LR(__ LoadUniqueObject(LR, StubCode::MegamorphicCall()));
} else {
__ LoadUniqueObject(CODE_REG, StubCode::MegamorphicCall());
@ -643,7 +643,7 @@ void FlowGraphCompiler::EmitInstanceCallAOT(const ICData& ic_data,
(ic_data.SizeWithoutTypeArgs() - 1) * compiler::target::kWordSize);
if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
// The AOT runtime will replace the slot in the object pool with the
// entrypoint address - see clustered_snapshot.cc.
// entrypoint address - see app_snapshot.cc.
CLOBBERS_LR(__ LoadUniqueObject(LR, initial_stub));
} else {
__ LoadUniqueObject(CODE_REG, initial_stub);

View file

@ -578,7 +578,7 @@ void FlowGraphCompiler::EmitMegamorphicInstanceCall(
ASSERT((data_index + 1) == stub_index);
if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
// The AOT runtime will replace the slot in the object pool with the
// entrypoint address - see clustered_snapshot.cc.
// entrypoint address - see app_snapshot.cc.
CLOBBERS_LR(__ LoadDoubleWordFromPoolIndex(R5, LR, data_index));
} else {
__ LoadDoubleWordFromPoolIndex(R5, CODE_REG, data_index);
@ -638,7 +638,7 @@ void FlowGraphCompiler::EmitInstanceCallAOT(const ICData& ic_data,
if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
// The AOT runtime will replace the slot in the object pool with the
// entrypoint address - see clustered_snapshot.cc.
// entrypoint address - see app_snapshot.cc.
CLOBBERS_LR(__ LoadDoubleWordFromPoolIndex(R5, LR, data_index));
} else {
__ LoadDoubleWordFromPoolIndex(R5, CODE_REG, data_index);

View file

@ -581,7 +581,7 @@ void FlowGraphCompiler::EmitMegamorphicInstanceCall(
if (FLAG_precompiled_mode) {
if (FLAG_use_bare_instructions) {
// The AOT runtime will replace the slot in the object pool with the
// entrypoint address - see clustered_snapshot.cc.
// entrypoint address - see app_snapshot.cc.
__ LoadUniqueObject(RCX, StubCode::MegamorphicCall());
} else {
__ LoadUniqueObject(CODE_REG, StubCode::MegamorphicCall());
@ -639,7 +639,7 @@ void FlowGraphCompiler::EmitInstanceCallAOT(const ICData& ic_data,
RSP, (ic_data.SizeWithoutTypeArgs() - 1) * kWordSize));
if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
// The AOT runtime will replace the slot in the object pool with the
// entrypoint address - see clustered_snapshot.cc.
// entrypoint address - see app_snapshot.cc.
__ LoadUniqueObject(RCX, initial_stub);
} else {
const intptr_t entry_point_offset =

View file

@ -7,7 +7,7 @@
#include "vm/dart.h"
#include "vm/clustered_snapshot.h"
#include "vm/app_snapshot.h"
#include "vm/code_observers.h"
#include "vm/compiler/runtime_offsets_extracted.h"
#include "vm/compiler/runtime_offsets_list.h"

View file

@ -11,8 +11,8 @@
#include "lib/stacktrace.h"
#include "platform/assert.h"
#include "platform/unicode.h"
#include "vm/app_snapshot.h"
#include "vm/class_finalizer.h"
#include "vm/clustered_snapshot.h"
#include "vm/compiler/jit/compiler.h"
#include "vm/dart.h"
#include "vm/dart_api_impl.h"

View file

@ -951,7 +951,7 @@ enum class Nullability : uint8_t {
kNullable = 0,
kNonNullable = 1,
kLegacy = 2,
// Adjust kNullabilityBitSize in clustered_snapshot.cc if adding new values.
// Adjust kNullabilityBitSize in app_snapshot.cc if adding new values.
};
// Equality kind between types.

View file

@ -7,8 +7,8 @@
#include "include/dart_tools_api.h"
#include "platform/assert.h"
#include "platform/unicode.h"
#include "vm/app_snapshot.h"
#include "vm/class_finalizer.h"
#include "vm/clustered_snapshot.h"
#include "vm/dart_api_impl.h"
#include "vm/dart_api_message.h"
#include "vm/dart_api_state.h"

View file

@ -6,7 +6,7 @@
#include "platform/assert.h"
#include "platform/globals.h"
#include "vm/clustered_snapshot.h"
#include "vm/app_snapshot.h"
#include "vm/compiler/assembler/disassembler.h"
#include "vm/flags.h"
#include "vm/heap/safepoint.h"

View file

@ -7,6 +7,8 @@
vm_sources = [
"allocation.cc",
"allocation.h",
"app_snapshot.cc",
"app_snapshot.h",
"base64.cc",
"base64.h",
"base_isolate.h",
@ -30,8 +32,6 @@ vm_sources = [
"class_table.h",
"closure_functions_cache.cc",
"closure_functions_cache.h",
"clustered_snapshot.cc",
"clustered_snapshot.h",
"code_comments.cc",
"code_comments.h",
"code_descriptors.cc",

View file

@ -17,7 +17,7 @@ import utils
# backwards-compatible.
VM_SNAPSHOT_FILES = [
# Header files.
'clustered_snapshot.h',
'app_snapshot.h',
'datastream.h',
'image_snapshot.h',
'object.h',
@ -25,7 +25,7 @@ VM_SNAPSHOT_FILES = [
'snapshot.h',
'symbols.h',
# Source files.
'clustered_snapshot.cc',
'app_snapshot.cc',
'dart.cc',
'dart_api_impl.cc',
'image_snapshot.cc',