aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-01 06:22:20 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-01 06:22:20 +0000
commitc9c643456fd863b807f5af25b9a028a480023fa6 (patch)
tree1816b08307f3f19705f9c3be2c92c8f48e181922 /vm_insnhelper.c
parente6ae621ec8fa6d27abeaf34a7ee8105c85571527 (diff)
downloadruby-c9c643456fd863b807f5af25b9a028a480023fa6.tar.gz
remove old VM profile counters.
* vm_insnhelper.c: remove `vm_profile_counter` because it is replaced with debug_counters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 37c5d3dab0..d99711e11f 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1859,35 +1859,6 @@ call_cfunc_15(VALUE (*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
}
-#ifndef VM_PROFILE
-#define VM_PROFILE 0
-#endif
-
-#if VM_PROFILE
-enum {
- VM_PROFILE_R2C_CALL,
- VM_PROFILE_R2C_POPF,
- VM_PROFILE_C2C_CALL,
- VM_PROFILE_C2C_POPF,
- VM_PROFILE_COUNT
-};
-static int vm_profile_counter[VM_PROFILE_COUNT];
-#define VM_PROFILE_UP(x) (vm_profile_counter[VM_PROFILE_##x]++)
-#define VM_PROFILE_ATEXIT() atexit(vm_profile_show_result)
-static void
-vm_profile_show_result(void)
-{
- fprintf(stderr, "VM Profile results: \n");
- fprintf(stderr, "r->c call: %d\n", vm_profile_counter[VM_PROFILE_R2C_CALL]);
- fprintf(stderr, "r->c popf: %d\n", vm_profile_counter[VM_PROFILE_R2C_POPF]);
- fprintf(stderr, "c->c call: %d\n", vm_profile_counter[VM_PROFILE_C2C_CALL]);
- fprintf(stderr, "c->c popf: %d\n", vm_profile_counter[VM_PROFILE_C2C_POPF]);
-}
-#else
-#define VM_PROFILE_UP(x)
-#define VM_PROFILE_ATEXIT()
-#endif
-
static inline int
vm_cfp_consistent_p(rb_execution_context_t *ec, const rb_control_frame_t *reg_cfp)
{
@@ -1954,7 +1925,6 @@ vm_call_cfunc_with_frame(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp
if (len >= 0) rb_check_arity(argc, len, len);
reg_cfp->sp -= argc + 1;
- VM_PROFILE_UP(R2C_CALL);
val = (*cfunc->invoker)(cfunc->func, recv, argc, reg_cfp->sp + 1);
CHECK_CFP_CONSISTENCY("vm_call_cfunc");