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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9640e68d58cfbda91dc7c034982b3e43eec6048729d0ca61c8498495ad8f4277
4
- data.tar.gz: ab154e734bfb085aff5615837efda1b7836784019fd689051b21db483f86c62b
3
+ metadata.gz: 47df73ea238560430f56d7b1ee2f0484e9e57b8f0784e065209cd5cfbe7b1084
4
+ data.tar.gz: 1517522202fd357b31db4a087f769991ccf9f0a0c56b38191f64976827b3e752
5
5
  SHA512:
6
- metadata.gz: a87a874de0373814d27f9e567c19fa4d36f5c2cdb5db2f3a6d7a7ce3280917dd8ecf0fc85b130f3573aa496cc5633427b92780f48ab00dc9cac8e6649763502a
7
- data.tar.gz: c5ef422b98a1cf2835f62d0769c0e0ea2b7d0f6af36888f05617795e4667a0bf4bbcf404e0e860fbdf319ae2be8e41fd84f09c2168282e6a0adfbee92a252840
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.
@@ -26,5 +26,5 @@
26
26
  # frozen_string_literal: true
27
27
 
28
28
  module GvlTracing
29
- VERSION = "1.5.0"
29
+ VERSION = "1.5.1"
30
30
  end
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.0
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.5.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