From 5577a8776ebcd801122f52d612285faee1dde0f2 Mon Sep 17 00:00:00 2001
From: tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Wed, 9 Jan 2019 23:04:00 +0000
Subject: insns.def (duparray, duphash): add dtrace hooks

They are considered Array and Hash creation events, so
allow dtrace (and systemtap) to track those creations.

Co-Authored-By: Eric Wong <e@80x24.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 insns.def | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'insns.def')

diff --git a/insns.def b/insns.def
index 2690539085..5aa7957c5d 100644
--- a/insns.def
+++ b/insns.def
@@ -453,6 +453,7 @@ duparray
 ()
 (VALUE val)
 {
+    RUBY_DTRACE_CREATE_HOOK(ARRAY, RARRAY_LEN(ary));
     val = rb_ary_resurrect(ary);
 }
 
@@ -463,6 +464,7 @@ duphash
 ()
 (VALUE val)
 {
+    RUBY_DTRACE_CREATE_HOOK(HASH, RHASH_SIZE(hash) << 1);
     val = rb_hash_resurrect(hash);
 }
 
-- 
cgit v1.2.3

