Browse files

Optimize for JRuby 32/64 bit differences

  • Loading branch information...
1 parent 4a236a2 commit 8f4823435683b57b048aa2d4823ecf57920b99d6 @joshuaclayton joshuaclayton committed Dec 16, 2013
Showing with 8 additions and 1 deletion.
  1. +8 −1 features/support/env.rb
View
9 features/support/env.rb
@@ -9,6 +9,13 @@
Aruba.configure do |config|
config.before_cmd do |cmd|
set_env('JRUBY_OPTS', "-X-C #{ENV['JRUBY_OPTS']}") # disable JIT since these processes are so short lived
- set_env('JAVA_OPTS', "-d32 #{ENV['JAVA_OPTS']}") # force jRuby to use client JVM for faster startup times
+
+ java_options = ENV['JAVA_OPTS']
+
+ if 1.size == 4 # 4 for 32 bit java, 8 for 64 bit java.
+ set_env('JAVA_OPTS', "-d32 #{java_options}")
+ else
+ set_env('JAVA_OPTS', "-XX:+TieredCompilation -XX:TieredStopAtLevel=1 #{java_options}")
+ end
end
end if RUBY_PLATFORM == 'java'

0 comments on commit 8f48234

Please sign in to comment.