gvl-tracing 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/gvl_tracing_native_extension/gvl_tracing.c +5 -0
- data/lib/gvl_tracing/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47df73ea238560430f56d7b1ee2f0484e9e57b8f0784e065209cd5cfbe7b1084
|
4
|
+
data.tar.gz: 1517522202fd357b31db4a087f769991ccf9f0a0c56b38191f64976827b3e752
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed938fa078cb982b23efe5da8a1a0fcb6d367534e7eeb342b2ce4853bf82cb7f0bb7998fd1a0bfa3bc3fd61a9f5d049717e245235dcf3df5a072be0b54eb9c2b
|
7
|
+
data.tar.gz: c1f2db9dbde2a28321deee3b4186c08eb06f3da1f231f652d1822692e67e479e7be3a7b22daada77bc8130e9d6e016027b8470f9c84eceb827f4e06a17ac6d12
|
@@ -264,7 +264,9 @@ static void on_thread_event(rb_event_flag_t event_id, const rb_internal_thread_e
|
|
264
264
|
thread_local_state *state = GT_EVENT_LOCAL_STATE(event_data,
|
265
265
|
// These events are guaranteed to hold the GVL, so they can allocate
|
266
266
|
event_id & (RUBY_INTERNAL_THREAD_EVENT_STARTED | RUBY_INTERNAL_THREAD_EVENT_RESUMED));
|
267
|
+
|
267
268
|
if (!state) return;
|
269
|
+
|
268
270
|
#ifdef RUBY_3_3_PLUS
|
269
271
|
if (!state->thread) state->thread = event_data->thread;
|
270
272
|
#endif
|
@@ -299,6 +301,9 @@ static void on_thread_event(rb_event_flag_t event_id, const rb_internal_thread_e
|
|
299
301
|
static void on_gc_event(VALUE tpval, UNUSED_ARG void *_unused1) {
|
300
302
|
const char* event_name = "bug_unknown_event";
|
301
303
|
thread_local_state *state = GT_LOCAL_STATE(rb_thread_current(), false); // no alloc during GC
|
304
|
+
|
305
|
+
if (!state) return;
|
306
|
+
|
302
307
|
switch (rb_tracearg_event_flag(rb_tracearg_from_tracepoint(tpval))) {
|
303
308
|
case RUBY_INTERNAL_EVENT_GC_ENTER: event_name = "gc"; break;
|
304
309
|
// TODO: is it possible the thread wasn't running? Might need to save the last state.
|
data/lib/gvl_tracing/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gvl-tracing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivo Anjo
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
|
-
rubygems_version: 3.
|
56
|
+
rubygems_version: 3.4.10
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Get a timeline view of Global VM Lock usage in your Ruby app
|