We want these to be in a list to avoid the need for moving them
around, which would introduce the need to perform annoying accounting.
Test: ./test.py --host -j40
Bug:
36716572
Bug:
31455788
Change-Id: Ie16523f4e7d79934fa7844fb9b9a26e125cfa9eb
};
template <>
-struct CmdlineType<std::vector<ti::Agent>> : CmdlineTypeParser<std::vector<ti::Agent>> {
+struct CmdlineType<std::list<ti::Agent>> : CmdlineTypeParser<std::list<ti::Agent>> {
Result Parse(const std::string& args) {
- assert(false && "Use AppendValues() for an Agent vector type");
- return Result::Failure("Unconditional failure: Agent vector must be appended: " + args);
+ assert(false && "Use AppendValues() for an Agent list type");
+ return Result::Failure("Unconditional failure: Agent list must be appended: " + args);
}
Result ParseAndAppend(const std::string& args,
- std::vector<ti::Agent>& existing_value) {
+ std::list<ti::Agent>& existing_value) {
existing_value.emplace_back(args);
return Result::SuccessNoValue();
}
- static const char* Name() { return "std::vector<ti::Agent>"; }
+ static const char* Name() { return "std::list<ti::Agent>"; }
};
template <>
// .WithType<std::vector<ti::Agent>>().AppendValues()
// .IntoKey(M::AgentLib)
.Define("-agentpath:_")
- .WithType<std::vector<ti::Agent>>().AppendValues()
+ .WithType<std::list<ti::Agent>>().AppendValues()
.IntoKey(M::AgentPath)
.Define("-Xms_")
.WithType<MemoryKiB>()
std::string class_path_string_;
std::vector<std::string> properties_;
- std::vector<ti::Agent> agents_;
+ std::list<ti::Agent> agents_;
std::vector<Plugin> plugins_;
// The default stack size for managed threads created by the runtime.
RUNTIME_OPTIONS_KEY (std::string, CpuAbiList)
RUNTIME_OPTIONS_KEY (std::string, Fingerprint)
RUNTIME_OPTIONS_KEY (ExperimentalFlags, Experimental, ExperimentalFlags::kNone) // -Xexperimental:{...}
-RUNTIME_OPTIONS_KEY (std::vector<ti::Agent>, AgentLib) // -agentlib:<libname>=<options>
-RUNTIME_OPTIONS_KEY (std::vector<ti::Agent>, AgentPath) // -agentpath:<libname>=<options>
+RUNTIME_OPTIONS_KEY (std::list<ti::Agent>, AgentLib) // -agentlib:<libname>=<options>
+RUNTIME_OPTIONS_KEY (std::list<ti::Agent>, AgentPath) // -agentpath:<libname>=<options>
RUNTIME_OPTIONS_KEY (std::vector<Plugin>, Plugins) // -Xplugin:<library>
// Not parse-able from command line, but can be provided explicitly.
GetEnvHandler called in test 900
GetEnvHandler called with version 0x900fffff
GetEnv returned '900' environment!
+Agent_OnLoad called with options "test_900_round_2"
Hello, world!
Agent_OnUnload called
+Agent_OnUnload called
ArtPlugin_Deinitialize called in test 900
char* options,
void* reserved ATTRIBUTE_UNUSED) {
printf("Agent_OnLoad called with options \"%s\"\n", options);
+ if (strcmp("test_900_round_2", options) == 0) {
+ return 0;
+ }
uintptr_t env = 0;
jint res = vm->GetEnv(reinterpret_cast<void**>(&env), TEST_900_ENV_VERSION_NUMBER);
if (res != JNI_OK) {
plugin=libartagent.so
fi
./default-run "$@" --runtime-option -agentpath:${plugin}=test_900 \
+ --runtime-option -agentpath:${plugin}=test_900_round_2 \
--android-runtime-option -Xplugin:${plugin}