summaryrefslogtreecommitdiff
path: root/runtime/common_runtime_test.h
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2017-07-22 03:08:26 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-07-22 03:08:26 +0000
commit36898d089e48cd9363ca531b436ece8703e6da1c (patch)
tree524a435dd0523819e5072bc2c18f42563d16a386 /runtime/common_runtime_test.h
parente3f66f506cb6469ec80267277400cc7c6a3c8bd6 (diff)
parent26761f758aff822b1204e05ce37687d0a1557399 (diff)
Merge changes Ia8b678ab,I823201e3
* changes: ART: Move FillHeap to CommonRuntimeTest ART: Account for OOME during array merging
Diffstat (limited to 'runtime/common_runtime_test.h')
-rw-r--r--runtime/common_runtime_test.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/common_runtime_test.h b/runtime/common_runtime_test.h
index daf9ac344e..74bc0b2afb 100644
--- a/runtime/common_runtime_test.h
+++ b/runtime/common_runtime_test.h
@@ -44,6 +44,8 @@ class DexFile;
class JavaVMExt;
class Runtime;
typedef std::vector<std::pair<std::string, const void*>> RuntimeOptions;
+class Thread;
+class VariableSizedHandleScope;
uint8_t* DecodeBase64(const char* src, size_t* dst_size);
@@ -105,6 +107,14 @@ class CommonRuntimeTestImpl {
// Retuerns the filename for a test dex (i.e. XandY or ManyMethods).
std::string GetTestDexFileName(const char* name) const;
+ // A helper function to fill the heap.
+ static void FillHeap(Thread* self,
+ ClassLinker* class_linker,
+ VariableSizedHandleScope* handle_scope)
+ REQUIRES_SHARED(Locks::mutator_lock_);
+ // A helper to set up a small heap (4M) to make FillHeap faster.
+ static void SetUpRuntimeOptionsForFillHeap(RuntimeOptions *options);
+
protected:
// Allow subclases such as CommonCompilerTest to add extra options.
virtual void SetUpRuntimeOptions(RuntimeOptions* options ATTRIBUTE_UNUSED) {}