Skip to content

Commit adfcdbb

Browse files
authored
Revert "Made it so you can specify the old gen heap size. (flutter#15259)"
This reverts commit 8d790a1.
1 parent 2d2e1ab commit adfcdbb

File tree

6 files changed

+0
-40
lines changed

6 files changed

+0
-40
lines changed

common/settings.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ std::string Settings::ToString() const {
5858
stream << "assets_path: " << assets_path << std::endl;
5959
stream << "frame_rasterized_callback set: " << !!frame_rasterized_callback
6060
<< std::endl;
61-
stream << "old_gen_heap_size: " << old_gen_heap_size << std::endl;
6261
return stream.str();
6362
}
6463

common/settings.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,6 @@ struct Settings {
191191
// the buffer must be as small as possible.
192192
std::shared_ptr<const fml::Mapping> persistent_isolate_data;
193193

194-
/// Max size of old gen heap size in MB, or 0 for unlimited, -1 for default
195-
/// value.
196-
///
197-
/// See also:
198-
/// https://github.com/dart-lang/sdk/blob/ca64509108b3e7219c50d6c52877c85ab6a35ff2/runtime/vm/flag_list.h#L150
199-
int64_t old_gen_heap_size = -1;
200-
201194
std::string ToString() const;
202195
};
203196

runtime/dart_vm.cc

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <sys/stat.h>
88

99
#include <mutex>
10-
#include <sstream>
1110
#include <vector>
1211

1312
#include "flutter/common/settings.h"
@@ -112,12 +111,6 @@ static const char* kDartTraceStreamsArgs[] = {
112111
"--timeline_streams=Compiler,Dart,Debugger,Embedder,GC,Isolate,VM,API",
113112
};
114113

115-
static std::string DartOldGenHeapSizeArgs(uint64_t heap_size) {
116-
std::ostringstream oss;
117-
oss << "--old_gen_heap_size=" << heap_size;
118-
return oss.str();
119-
}
120-
121114
constexpr char kFileUriPrefix[] = "file://";
122115
constexpr size_t kFileUriPrefixLength = sizeof(kFileUriPrefix) - 1;
123116

@@ -373,13 +366,6 @@ DartVM::DartVM(std::shared_ptr<const DartVMData> vm_data,
373366
PushBackAll(&args, kDartTraceStartupArgs, fml::size(kDartTraceStartupArgs));
374367
}
375368

376-
std::string old_gen_heap_size_args;
377-
if (settings_.old_gen_heap_size >= 0) {
378-
old_gen_heap_size_args =
379-
DartOldGenHeapSizeArgs(settings_.old_gen_heap_size);
380-
args.push_back(old_gen_heap_size_args.c_str());
381-
}
382-
383369
#if defined(OS_FUCHSIA)
384370
PushBackAll(&args, kDartFuchsiaTraceArgs, fml::size(kDartFuchsiaTraceArgs));
385371
PushBackAll(&args, kDartTraceStreamsArgs, fml::size(kDartTraceStreamsArgs));

runtime/dart_vm_unittests.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,5 @@ TEST_F(DartVMTest, SimpleIsolateNameServer) {
3232
ASSERT_TRUE(ns->RemoveIsolateNameMapping("foobar"));
3333
}
3434

35-
TEST_F(DartVMTest, OldGenHeapSize) {
36-
ASSERT_FALSE(DartVMRef::IsInstanceRunning());
37-
auto settings = CreateSettingsForFixture();
38-
settings.old_gen_heap_size = 1024;
39-
auto vm = DartVMRef::Create(settings);
40-
// There is no way to introspect on the heap size so we just assert the vm was
41-
// created.
42-
ASSERT_TRUE(vm);
43-
}
44-
4535
} // namespace testing
4636
} // namespace flutter

shell/platform/embedder/embedder.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,6 @@ FlutterEngineResult FlutterEngineInitialize(size_t version,
664664
settings.icu_data_path = icu_data_path;
665665
settings.assets_path = args->assets_path;
666666
settings.leak_vm = !SAFE_ACCESS(args, shutdown_dart_vm_when_done, false);
667-
settings.old_gen_heap_size = SAFE_ACCESS(args, dart_old_gen_heap_size, -1);
668667

669668
if (!flutter::DartVM::IsRunningPrecompiledCode()) {
670669
// Verify the assets path contains Dart 2 kernel assets.

shell/platform/embedder/embedder.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,13 +1114,6 @@ typedef struct {
11141114
/// absence, platforms views in the scene are ignored and Flutter renders to
11151115
/// the root surface as normal.
11161116
const FlutterCompositor* compositor;
1117-
1118-
/// Max size of the old gen heap for the Dart VM in MB, or 0 for unlimited, -1
1119-
/// for default value.
1120-
///
1121-
/// See also:
1122-
/// https://github.com/dart-lang/sdk/blob/ca64509108b3e7219c50d6c52877c85ab6a35ff2/runtime/vm/flag_list.h#L150
1123-
int64_t dart_old_gen_heap_size;
11241117
} FlutterProjectArgs;
11251118

11261119
//------------------------------------------------------------------------------

0 commit comments

Comments
 (0)