vernier 0.1.0 → 0.1.999

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: 97eadc619870ae964e5bf61e925791d4399c0480775aadc5af31597535ae0374
4
- data.tar.gz: 5327fd25cfac20752905f89126e8f6a4422e8cc90c134bab98a47b7132f7909d
3
+ metadata.gz: bdb4d7d32dcaf189d999cfaee665b20a57e97db378b46dd45c73c82a1c4376c3
4
+ data.tar.gz: c72210b3fc60d65e0fd6e64af43cb1ac828879d4555151c89d43560a8a4e3f75
5
5
  SHA512:
6
- metadata.gz: f0fd5a598a03f41a0d5984d4652f3f85dece310ca83c015b554b85271cda220ca2535c198d4d62dad39532861ff38c858cb1048e46c29a43ce25c4fcb318ba7f
7
- data.tar.gz: d7e0462723a56f1e7a1cef5c96f2a86958df9b129442defa7814c2b5dc8d2844a1507abf0ea486d7a0458257347e9cf243d6f369568258bbdde0fa374a9d7268
6
+ metadata.gz: c337257e4808c6170701c2078d29e93df73c6b4855e02d079e8d7a7b49344180e9b6a184cc01b18d23d3038e60a36c0c80816a711c2270bfde9ba14d18f4a45f
7
+ data.tar.gz: b141496282462bdfb536947d7667c71922ad885b5a6bcb4c14b2b681904b72d32f3d4423eb08cd1afaa632d039fd040cb3655f35e1d3bad49271fd6895d3bdec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vernier (0.1.0)
4
+ vernier (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -4,6 +4,7 @@
4
4
  #include <algorithm>
5
5
  #include <sstream>
6
6
  #include <unordered_map>
7
+ #include <unordered_set>
7
8
 
8
9
  #include "vernier.hh"
9
10
  #include "stack.hh"
@@ -19,6 +20,7 @@ struct retained_collector {
19
20
  int allocated_objects = 0;
20
21
  int freed_objects = 0;
21
22
 
23
+ std::unordered_set<VALUE> unique_frames;
22
24
  std::unordered_map<VALUE, std::unique_ptr<Stack>> object_frames;
23
25
  };
24
26
 
@@ -54,6 +56,10 @@ newobj_i(VALUE tpval, void *data) {
54
56
  int lines_buffer[2048];
55
57
  int n = rb_profile_frames(0, 2048, frames_buffer, lines_buffer);
56
58
 
59
+ for (int i = 0; i < n; i++) {
60
+ collector->unique_frames.insert(frames_buffer[i]);
61
+ }
62
+
57
63
  collector->object_frames.emplace(
58
64
  tp.obj,
59
65
  make_unique<Stack>(frames_buffer, lines_buffer, n)
@@ -166,12 +172,8 @@ retained_collector_mark(void *data) {
166
172
  // We don't mark the objects, but we MUST mark the frames, otherwise they
167
173
  // can be garbage collected.
168
174
  // This may lead to method entries being unnecessarily retained.
169
- for (auto& it: collector->object_frames) {
170
- const Stack &stack = *it.second;
171
-
172
- for (int i = 0; i < stack.size(); i++) {
173
- rb_gc_mark(stack.frames[i]);
174
- }
175
+ for (VALUE frame: collector->unique_frames) {
176
+ rb_gc_mark(frame);
175
177
  }
176
178
  }
177
179
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vernier
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.999"
5
5
  end
data/vernier.gemspec CHANGED
@@ -18,6 +18,13 @@ Gem::Specification.new do |spec|
18
18
  spec.metadata["source_code_uri"] = spec.homepage
19
19
  spec.metadata["changelog_uri"] = spec.homepage
20
20
 
21
+ spec.post_install_message = <<~WARNING
22
+ #{'!'*80}
23
+ WARNING! You've installed a very old version of Vernier, likely due to Ruby >= 3.2 version requirement.
24
+ Please use gem "vernier", "~> 1.0" in your gemspec to install a modern version.
25
+ #{'!'*80}
26
+ WARNING
27
+
21
28
  # Specify which files should be added to the gem when it is released.
22
29
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
30
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vernier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.999
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Hawthorn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-27 00:00:00.000000000 Z
11
+ date: 2024-05-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: An experimental profiler
14
14
  email:
@@ -41,7 +41,11 @@ metadata:
41
41
  homepage_uri: https://github.com/jhawthorn/vernier
42
42
  source_code_uri: https://github.com/jhawthorn/vernier
43
43
  changelog_uri: https://github.com/jhawthorn/vernier
44
- post_install_message:
44
+ post_install_message: |
45
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
46
+ WARNING! You've installed a very old version of Vernier, likely due to Ruby >= 3.2 version requirement.
47
+ Please use gem "vernier", "~> 1.0" in your gemspec to install a modern version.
48
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
45
49
  rdoc_options: []
46
50
  require_paths:
47
51
  - lib
@@ -56,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
60
  - !ruby/object:Gem::Version
57
61
  version: '0'
58
62
  requirements: []
59
- rubygems_version: 3.3.3
63
+ rubygems_version: 3.5.9
60
64
  signing_key:
61
65
  specification_version: 4
62
66
  summary: An experimental profiler