Skip to content

Commit a11ad3b

Browse files
committed
Add native-host-inlining env file and improve extract_host_inlining.rb
1 parent c759ede commit a11ad3b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

mx.truffleruby/native-host-inlining

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
GRAALVM_SKIP_ARCHIVE=true
2+
DYNAMIC_IMPORTS=/tools,/compiler,/substratevm
3+
COMPONENTS=TruffleRuby,suite:tools,GraalVM compiler,SubstrateVM,Native Image
4+
NATIVE_IMAGES=lib:rubyvm
5+
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:Log=TruffleHostInliningPhase,~CanonicalizerPhase,~GraphBuilderPhase rubyvm:-H:+TruffleHostInliningPrintExplored rubyvm:-Dgraal.LogFile=host-inlining.txt
6+
# To also create the standalone
7+
DISABLE_INSTALLABLES=false

tool/extract_host_inlining.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Example:
2+
# ruby tool/extract_host_inlining.rb org.truffleruby.language.dispatch.RubyCallNode.execute host-inlining.txt
3+
14
simplify = ARGV.delete '--simplify'
25

36
raise unless ARGV.size == 2
@@ -46,4 +49,10 @@
4649
}
4750
end
4851

52+
# Reduce line width for unimportant information
53+
lines = lines.map { |line|
54+
line.sub(/\[inlined\s.+?invoke\s+(true|false),/, '')
55+
.sub(/,\s*incomplete\s+(true|false),/, ',')
56+
}
57+
4958
puts lines.join

0 commit comments

Comments
 (0)