diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-02-24 01:29:46 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-02-24 01:29:47 +0000 |
commit | 4fa1a274024067e160a60d0a77124e95dca980e1 (patch) | |
tree | 61dd41429b6b2ed29239f0c619c0e7ea058fd4ac /cmdline | |
parent | 40c99de1fd26f9ba6fae20a01175240b96fc7443 (diff) | |
parent | 2535abe7d1fcdd0e6aca782b1f1932a703ed50a4 (diff) | |
download | art-4fa1a274024067e160a60d0a77124e95dca980e1.zip art-4fa1a274024067e160a60d0a77124e95dca980e1.tar.gz art-4fa1a274024067e160a60d0a77124e95dca980e1.tar.bz2 |
Merge "Add JIT"
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/cmdline_parser_test.cc | 25 | ||||
-rw-r--r-- | cmdline/cmdline_types.h | 2 |
2 files changed, 24 insertions, 3 deletions
diff --git a/cmdline/cmdline_parser_test.cc b/cmdline/cmdline_parser_test.cc index b740b41..18d8c7a 100644 --- a/cmdline/cmdline_parser_test.cc +++ b/cmdline/cmdline_parser_test.cc @@ -411,6 +411,26 @@ TEST_F(CmdlineParserTest, TestCompilerOption) { } // TEST_F /* +* -Xjit, -Xnojit, -Xjitcodecachesize, Xjitcompilethreshold +*/ +TEST_F(CmdlineParserTest, TestJitOptions) { + /* + * Test successes + */ + { + EXPECT_SINGLE_PARSE_VALUE(true, "-Xjit", M::UseJIT); + EXPECT_SINGLE_PARSE_VALUE(false, "-Xnojit", M::UseJIT); + } + { + EXPECT_SINGLE_PARSE_VALUE(MemoryKiB(16 * KB), "-Xjitcodecachesize:16K", M::JITCodeCacheCapacity); + EXPECT_SINGLE_PARSE_VALUE(MemoryKiB(16 * MB), "-Xjitcodecachesize:16M", M::JITCodeCacheCapacity); + } + { + EXPECT_SINGLE_PARSE_VALUE(12345u, "-Xjitthreshold:12345", M::JITCompileThreshold); + } +} // TEST_F + +/* * -X-profile-* */ TEST_F(CmdlineParserTest, TestProfilerOptions) { @@ -495,9 +515,8 @@ TEST_F(CmdlineParserTest, TestIgnoredArguments) { "-dsa", "-enablesystemassertions", "-disablesystemassertions", "-Xrs", "-Xint:abdef", "-Xdexopt:foobar", "-Xnoquithandler", "-Xjnigreflimit:ixnay", "-Xgenregmap", "-Xnogenregmap", "-Xverifyopt:never", "-Xcheckdexsum", "-Xincludeselectedop", "-Xjitop:noop", - "-Xincludeselectedmethod", "-Xjitthreshold:123", "-Xjitcodecachesize:12345", - "-Xjitblocking", "-Xjitmethod:_", "-Xjitclass:nosuchluck", "-Xjitoffset:none", - "-Xjitconfig:yes", "-Xjitcheckcg", "-Xjitverbose", "-Xjitprofile", + "-Xincludeselectedmethod", "-Xjitblocking", "-Xjitmethod:_", "-Xjitclass:nosuchluck", + "-Xjitoffset:none", "-Xjitconfig:yes", "-Xjitcheckcg", "-Xjitverbose", "-Xjitprofile", "-Xjitdisableopt", "-Xjitsuspendpoll", "-XX:mainThreadStackSize=1337" }; diff --git a/cmdline/cmdline_types.h b/cmdline/cmdline_types.h index 180baec..04ea368 100644 --- a/cmdline/cmdline_types.h +++ b/cmdline/cmdline_types.h @@ -585,6 +585,8 @@ struct CmdlineType<LogVerbosity> : CmdlineTypeParser<LogVerbosity> { log_verbosity.heap = true; } else if (verbose_options[j] == "jdwp") { log_verbosity.jdwp = true; + } else if (verbose_options[j] == "jit") { + log_verbosity.jit = true; } else if (verbose_options[j] == "jni") { log_verbosity.jni = true; } else if (verbose_options[j] == "monitor") { |