Skip to content

Commit

Permalink
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
GRAALVM_VERSION = "0.11"

JRUBY_DIR = File.expand_path('../..', __FILE__)
M2_REPO = File.expand_path('~/.m2/repository')

JDEBUG_PORT = 51819
JDEBUG = "-J-agentlib:jdwp=transport=dt_socket,server=y,address=#{JDEBUG_PORT},suspend=y"
@@ -456,6 +457,13 @@ def run(*args)
jruby_args += %w[-Xtruffle.instrumentation_server_port=8080]
end

if args.delete('--profile')
v = Utilities.truffle_version
jruby_args << "-J-Xbootclasspath/a:#{M2_REPO}/com/oracle/truffle/truffle-debug/#{v}/truffle-debug-#{v}.jar"
jruby_args << "-J-Dtruffle.profiling.enabled=true"
jruby_args << "-Xtruffle.profiler=true"
end

if args.delete('--igv')
warn "warning: --igv might not work on master - if it does not, use truffle-head instead which builds against latest graal" if Utilities.git_branch == 'master'
Utilities.ensure_igv_running

0 comments on commit 58edb3b

Please sign in to comment.