From: Eric Wong <e@80x24.org>
To: spew@80x24.org
Cc: Eric Wong <e@80x24.org>
Subject: [PATCH 1/2] insns.def (duparray, duphash): add dtrace hooks
Date: Sun, 16 Dec 2018 12:06:29 +0000 [thread overview]
Message-ID: <20181216120630.17237-1-e@80x24.org> (raw)
They are considered Array and Hash creation events, so
allow dtrace (and systemtap) to track those creations.
[ruby-core:90418] [Bug #15399]
---
insns.def | 2 ++
1 file changed, 2 insertions(+)
diff --git a/insns.def b/insns.def
index 73628a3376..a74ac11c35 100644
--- a/insns.def
+++ b/insns.def
@@ -451,6 +451,7 @@ duparray
()
(VALUE val)
{
+ RUBY_DTRACE_CREATE_HOOK(ARRAY, RARRAY_LEN(ary));
val = rb_ary_resurrect(ary);
}
@@ -461,6 +462,7 @@ duphash
()
(VALUE val)
{
+ RUBY_DTRACE_CREATE_HOOK(HASH, RHASH_SIZE(hash) << 1);
val = rb_hash_dup(hash);
}
--
EW
next reply other threads:[~2018-12-16 12:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-16 12:06 Eric Wong [this message]
2018-12-16 12:06 ` [PATCH 2/2] gc.c: make gc_enter+gc_exit pairs dtrace probes, too Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181216120630.17237-1-e@80x24.org \
--to=e@80x24.org \
--cc=spew@80x24.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).