Skip to content

Instantly share code, notes, and snippets.

View chrisseaton's full-sized avatar

Chris Seaton chrisseaton

View GitHub Profile
This file has been truncated, but you can view the full file.
$ jruby+truffle --graal-path $GRAAL_BIN_MASTER run --graal -J-G:+TraceTruffleCompilation -J-G:+TraceTruffleTransferToInterpreter -J-G:+TraceTruffleAssumptions -J-Dtruffle.TraceRewrites=true -J-Xmx1500m benchmark/mcts_avg.rb
warning: ignoring extraneous `ruby-' prefix in version `ruby-2.2.3'
(set by /Users/chrisseaton/Documents/ruby/rubykon/.ruby-version)
$ JAVACMD=/Users/chrisseaton/Documents/graal/graalvm-jdk1.8.0/bin/java ../jruby/bin/jruby -X\+T -J-G:\+TraceTruffleCompilation -J-G:\+TraceTruffleTransferToInterpreter -J-G:\+TraceTruffleAssumptions -J-Dtruffle.TraceRewrites\=true -J-Xmx1500m -Xtruffle.core.load_path\=../jruby/truffle/src/main/ruby -r ./.jruby\+truffle_bundle/bundler/setup.rb benchmark/mcts_avg.rb
[truffle] rewrite UninitializedNode_ |From G UninitializedNode_ |To G SingletonClassClassNode_ |Reason UninitializedNode_ insert new specialization with parameters (org.jruby.truffle.runtime.core.ModuleFields@5e7cd6cc(Array
$ jruby+truffle --graal-path $GRAAL_BIN_MASTER run --graal -J-G:+TraceTruffleCompilation -J-G:+TraceTruffleTransferToInterpreter -J-G:+TraceTruffleAssumptions -J-Xmx1500m benchmark/mcts_avg.rb
Warming up...
--------------------------------------------------------------------------------
[truffle] opt done block in map:board.rb:59 <opt> <split-0-U> |ASTSize 34/ 34 |Time 446( 306+140 )ms |DirectCallNodes I 0/D 0 |GraalNodes 76/ 104 |CodeSize 357 |Source board.rb:59
[truffle] opt done map:core: Array#map <opt> <split-1-U> |ASTSize 12/ 46 |Time 872( 475+397 )ms |DirectCallNodes I 1/D 0 |GraalNodes 165/ 468 |CodeSize 1532 |Source core: Array#map
[truffle] opt done %:core: Fixnum#% <opt> <split-0-U> |ASTSize 7/ 7 |Time 50( 33+17 )ms |DirectCallNodes I 0/D 0 |GraalNodes 33/ 36 |CodeSize 169 |Source core: Fixnum#%
[truffle] opt done
This file has been truncated, but you can view the full file.
$ JAVACMD=/Users/chrisseaton/Documents/graal/graalvm-jdk1.8.0/bin/java ../jruby/bin/jruby -X\+T -J-G:\+TraceTruffleCompilation -J-G:\+TraceTruffleCompilationDetails -J-G:\+TraceTruffleTransferToInterpreter -J-G:\+TruffleCompilationExceptionsAreFatal -Xtruffle.core.load_path\=../jruby/truffle/src/main/ruby -r ./.jruby\+truffle_bundle/bundler/setup.rb benchmark/test.rb
[truffle] opt start <:core: Fixnum#< <split-11-U> |ASTSize 6/ 6 |Calls/Thres 1000/ 3 |CallsAndLoop/Thres 1000/ 1000 |Inval# 0
[truffle] opt queued <:core: Fixnum#< <split-11-U> |ASTSize 6/ 6 |Calls/Thres 1000/ 3 |CallsAndLoop/Thres 1000/ 1000 |Inval# 0
[truffle] opt start at:core: Array#at <split-5-U> |ASTSize 10/ 10 |Calls/Thres 1000/ 3 |CallsAndLoop/Thres 1000/ 1000 |Inval# 0
[truffle] opt queued at:core: Array#at <split-5-U>
# This file modifies benchmark-ips to better accommodate the optimisation
# characteristics of sophisticated implementations of Ruby that have a very
# large difference between cold and warmed up performance, and that apply
# optimisations such as value profiling or other speculation on runtime values.
# Recommended to be used with a large (60s) warmup and (30s) measure time. This
# has been modified to be the default. Note that on top of that, it now runs
# warmup five times, so generating the report will be a lot slower than
# before.
# Code is modified from benchmark-ips
$ jruby+truffle --graal-path ../../graal/graalvm-jdk1.8.0/bin/java run --graal benchmark/scoring.rb
$ JAVACMD=../../graal/graalvm-jdk1.8.0/bin/java ../jruby/bin/jruby -X\+T -Xtruffle.core.load_path\=../jruby/truffle/src/main/ruby -r ./.jruby\+truffle_bundle/bundler/setup.rb benchmark/scoring.rb
Calculating -------------------------------------
19x19 scoring 1.112k i/100ms
^C/Users/chrisseaton/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jruby+truffle_runner-0.0.1/lib/jruby+truffle_runner.rb:369:in `system': Interrupt
from /Users/chrisseaton/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jruby+truffle_runner-0.0.1/lib/jruby+truffle_runner.rb:369:in `execute_cmd'
from /Users/chrisseaton/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jruby+truffle_runner-0.0.1/lib/jruby+truffle_runner.rb:335:in `subcommand_run'
from /Users/chrisseaton/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jruby+truffle_runner-0.0.1/lib/jruby+truffle_runner.rb:147:in `initialize'
from /Users/chrisseaton/.rbenv/versions/
$ clang -v -o test test.c -lgmp
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name test.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 253.2 -v -dwarf-column-info -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fdebug-compilation-dir /Users/chrisseaton/Documents/ruby/rubykon -ferror-limit 19 -fmessage-length 190 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.11.0 -fencode-extended-block-signature -
$ clang -c -o test test.c -lgmp
clang: warning: -lgmp: 'linker' input unused
test.c:1:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
^
1 error generated.
$ clang -I/usr/local/include/ -c -o test test.c -lgmp
clang: warning: -lgmp: 'linker' input unused
test.c:36:3: warning: implicit declaration of function '__gmpz_out_str' is invalid in C99 [-Wimplicit-function-declaration]
class Foo
def initialize(x, y)
@x = x
@y = y
end
def foo
@x + @y
end
end
package org.jruby.truffle.runtime.layouts;
import java.util.EnumSet;
import com.oracle.truffle.api.object.*;
import org.jruby.truffle.om.dsl.api.UnexpectedLayoutRefusalException;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.CompilerAsserts;
import java.util.concurrent.atomic.*;
import org.jruby.truffle.runtime.layouts.ArrayLayout;
import org.jruby.truffle.runtime.layouts.BasicObjectLayoutImpl;
org.jruby.truffle.nodes.core.TrufflePrimitiveNodes$PrintInterleavedBacktraceNode.printInterleavedBacktrace(TrufflePrimitiveNodes.java:558)
org.jruby.truffle.nodes.core.TrufflePrimitiveNodesFactory$PrintInterleavedBacktraceNodeFactory$PrintInterleavedBacktraceNodeGen.execute(TrufflePrimitiveNodesFactory.java:2122)
org.jruby.truffle.nodes.control.SequenceNode.execute(SequenceNode.java:91)
org.jruby.truffle.nodes.methods.ExceptionTranslatingNode.execute(ExceptionTranslatingNode.java:60)
org.jruby.truffle.nodes.RubyRootNode.execute(RubyRootNode.java:56)
../test.rb:2:in `print_interleaved_backtrace'
com.oracle.truffle.api.impl.DefaultCallTarget.call(DefaultCallTarget.java:76)
com.oracle.truffle.api.impl.DefaultDirectCallNode.call(DefaultDirectCallNode.java:65)
org.jruby.truffle.nodes.dispatch.CachedBoxedDispatchNode.executeDispatch(CachedBoxedDispatchNode.java:117)
org.jruby.truffle.nodes.dispatch.UnresolvedDispatchNode.executeDispatch(UnresolvedDispatchNode.java:110)