Skip to content

Instantly share code, notes, and snippets.

View ryoqun's full-sized avatar

Ryo Onodera ryoqun

View GitHub Profile
module M
class A
def get_value
end
end
class B
def get_value
end
end
1: LD vm/vm
/home/ryoqun/rubinius/rubinius/vendor/llvm/Release/lib/libLLVMJIT.a(OProfileJITEventListener.o): In function `(anonymous namespace)::OProfileJITEventListener::~OProfileJITEventListener()':
OProfileJITEventListener.cpp:(.text+0x28c): undefined reference to `op_close_agent'
/home/ryoqun/rubinius/rubinius/vendor/llvm/Release/lib/libLLVMJIT.a(OProfileJITEventListener.o): In function `(anonymous namespace)::OProfileJITEventListener::~OProfileJITEventListener()':
OProfileJITEventListener.cpp:(.text+0x31c): undefined reference to `op_close_agent'
/home/ryoqun/rubinius/rubinius/vendor/llvm/Release/lib/libLLVMJIT.a(OProfileJITEventListener.o): In function `(anonymous namespace)::OProfileJITEventListener::NotifyFunctionEmitted(llvm::Function const&, void*, unsigned long, llvm::JITEvent_EmittedFunctionDetails const&)':
OProfileJITEventListener.cpp:(.text+0x3e0): undefined reference to `op_write_native_code'
OProfileJITEventListener.cpp:(.text+0x717): undefined reference to `op_write_debug_line_info'
/home/ry
ryoqun@rrm:~/rubinius/ryoqun$ RBXOPT=-Xint ./bin/benchmark benchmark/tiers/0/bm_loop_whileloop.rb
=== bin/rbx ===
while loop 10804546.2 (±2.1%) i/s - 52760344 in 4.888669s (cycle=29624)
ryoqun@rrm:~/rubinius/ryoqun$ RBXOPT=-Xint ./bin/benchmark benchmark/tiers/0/bm_loop_whileloop.rb
=== bin/rbx ===
while loop 13471175.6 (±1.8%) i/s - 65528949 in 4.866095s (cycle=28703)
ryoqun@rrm:~/rubinius/ryoqun$ RBXOPT=-Xint ./bin/benchmark benchmark/tiers/0/bm_loop_whileloop.rb
=== bin/rbx ===
while loop 10789886.2 (±1.1%) i/s - 52701280 in 4.885036s (cycle=28642)
ryoqun@rrm:~/rubinius/ryoqun$ RBXOPT=-Xint ./bin/benchmark benchmark/tiers/0/bm_loop_whileloop.rb
In file included from vm/capi/handle.cpp:3:
vm/gc/baker.hpp:274:7: error: expression result unused [-Werror,-Wunused-value]
VALGRIND_MAKE_MEM_NOACCESS(next->start().as_int(), next->size());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/valgrind/memcheck.h:110:5: note: expanded from:
VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */, \
^
/usr/include/valgrind/valgrind.h:383:5: note: expanded from:
_zzq_result; \
^~~~~~~~~~~
diff --git a/libopagent/opagent.h b/libopagent/opagent.h
index 9a4c860..de211c6 100644
--- a/libopagent/opagent.h
+++ b/libopagent/opagent.h
@@ -29,6 +29,7 @@
#define _LIB_OPAGENT_H
#include <sys/types.h>
+#include <stdint.h>
/*
* Command line: opannotate --merge all image:/home/ryoqun/rubinius/ryoqun/bin/rbx --assembly
*
* Interpretation of command line:
* Output annotated assembly listing with samples
*
* CPU: Core 2, speed 1.995e+06 MHz (estimated)
* Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
*/
:
/*
* Command line: opannotate --merge all image:/home/ryoqun/rubinius/ryoqun/bin/rbx --assembly
*
* Interpretation of command line:
* Output annotated assembly listing with samples
*
* CPU: Core 2, speed 1.995e+06 MHz (estimated)
* Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
*/
:
@ryoqun
ryoqun / gist:5097799
Created March 6, 2013 09:00
imporoved profiling!
: def has_dynamic_locals?
4329 0.4283 : @dynamic_locals
: end
:
37689 3.7291 : def dynamic_locals
47619 4.7116 : @dynamic_locals ||= Rubinius::LookupTable.new
: end
:
47433 4.6932 : def set_eval_local(name, val) /* _X_Rubinius::VariableScope#set_eval_local@2 total: 147284 14.5728 */
1261 0.1248 : scope = @parent
@ryoqun
ryoqun / gist:5097785
Created March 6, 2013 08:59
correct profiling confirmed
13306 2.8983 :def inner(i) /* _X_Object#inner@1 total: 42441 9.2445 */
4454 0.9702 : i += 1
6015 1.3102 : i += 1
3552 0.7737 : i += 1
30494 6.6422 : i += (i + 174) - (306 + i) + (-32 - i)
4078 0.8883 : i += 1
5071 1.1046 : i += 1
5409 1.1782 : i += 1
5101 1.1111 : i += 1
6711 1.4618 : i += 1
@ryoqun
ryoqun / gist:5090624
Last active December 14, 2015 12:59
initial jit profiling
: def has_dynamic_locals?
1010 0.2431 : @dynamic_locals
: end
:
19396 4.6684 : def dynamic_locals
15260 3.6729 : @dynamic_locals ||= Rubinius::LookupTable.new
: end
:
: def set_eval_local(name, val)
719 0.1731 : scope = @parent