stackprof 0.2.14 → 0.2.15

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: 50313d95bc2bb3257ea5d4bc6b4c1889f7d6c4c2612b35b7a289de1d8abddaf8
4
- data.tar.gz: ac748642b2298f1d23a0c950eed379dd6670eaef7ad300bc5ab5341886d22b39
3
+ metadata.gz: 19bdf20501dd49e005d6e9837cb614ede25adfe9da5ce42edff45f42c4f8ae7d
4
+ data.tar.gz: 02a2418957b11e71bbab119102b3880c8374fbcf52f480ebe0e03bb5a045b8d4
5
5
  SHA512:
6
- metadata.gz: d790c7c34cc8f12e5e3d12cfc2476e94801e62f79a8ccb747b3d0743b9b8d0bb8ec8fd92757c5696814c028ddeaa4044bbaa0d242fe5796079f741d2fdbef2d6
7
- data.tar.gz: b3e5d358816564a6a3a72bfd68c2d94f184a27430b9b75765cf733c4c5104e7c4020ce72bfdf6d3698bbf0456ca487314fb094a0faf6eed7040bce10726df017
6
+ metadata.gz: 050df074e6fc876fe212d34a35ec258a6cd7cecbdb9dfa51384bf58fadcd7e3e18d49fb5385c41fb5b79727795e467d27f8c41c98b0f95ff02fb297efa4438df
7
+ data.tar.gz: 77dafa295e0de1d75990a636e7c77f7a4632b98d71ff9d7b37db106dee6701306f4dc75cbe161ba6969bf86c181647b29f9ac1da85afb48b92172ae1d506ac54
@@ -1,7 +1,3 @@
1
- # 0.2.14
1
+ # 0.2.15
2
2
 
3
- * Relax threshold of missed_samples to <= 25 in GC test
4
- * Support custom metadata option in stackprof
5
- * Drop support for Ruby 2.1
6
- * More generic handling of "fake" frame names
7
- * Record marking and sweeping as fake gc calls
3
+ * Mark the metadata object before the GC is invoked to prevent it from being garbage collected.
@@ -284,6 +284,8 @@ stackprof_results(int argc, VALUE *argv, VALUE self)
284
284
  rb_hash_aset(results, sym_missed_samples, SIZET2NUM(_stackprof.overall_signals - _stackprof.overall_samples));
285
285
  rb_hash_aset(results, sym_metadata, _stackprof.metadata);
286
286
 
287
+ _stackprof.metadata = Qnil;
288
+
287
289
  frames = rb_hash_new();
288
290
  rb_hash_aset(results, sym_frames, frames);
289
291
  st_foreach(_stackprof.frames, frame_i, (st_data_t)frames);
@@ -653,6 +655,9 @@ frame_mark_i(st_data_t key, st_data_t val, st_data_t arg)
653
655
  static void
654
656
  stackprof_gc_mark(void *data)
655
657
  {
658
+ if (RTEST(_stackprof.metadata))
659
+ rb_gc_mark(_stackprof.metadata);
660
+
656
661
  if (RTEST(_stackprof.out))
657
662
  rb_gc_mark(_stackprof.out);
658
663
 
@@ -1,7 +1,7 @@
1
1
  require "stackprof/stackprof"
2
2
 
3
3
  module StackProf
4
- VERSION = '0.2.14'
4
+ VERSION = '0.2.15'
5
5
  end
6
6
 
7
7
  StackProf.autoload :Report, "stackprof/report.rb"
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'stackprof'
3
- s.version = '0.2.14'
3
+ s.version = '0.2.15'
4
4
  s.homepage = 'http://github.com/tmm1/stackprof'
5
5
 
6
6
  s.authors = 'Aman Gupta'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stackprof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.14
4
+ version: 0.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aman Gupta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-11 00:00:00.000000000 Z
11
+ date: 2019-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler