vernier 1.1.0 → 1.1.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: aa7e8ccc4ac1312ccffb820ec0c6690209725a26ff0f5a9945a508edca073975
4
- data.tar.gz: a0f7b10b284dd8fd387a8b12e15a2c9e8535e07f9d19f37c0734b08c93693956
3
+ metadata.gz: 1f250b62a547d9c79e6d7beb4382c4d8bdde8e2245e868c3ac5b8d5354e2929b
4
+ data.tar.gz: e900e786f82b759edc4dc83d5c9bfe37048ca3eca62a1352cef54e1ad2822069
5
5
  SHA512:
6
- metadata.gz: 7effed8c46b5110437f12d3fb8a4c4707e334c7edd51d4838198bb8dfb56cdd48c6d1700464be2d32b979f97eafc4c45a2406a4028cceadcac3bd71c1520babb
7
- data.tar.gz: 4f11e253e293fd455d1eff820262fb6ea217bf0e3c574dd14bc15c3638e576fd3fb25ee84c3cdeb7151b2877d3f918b4157262f3268797482c192f3935b8768a
6
+ metadata.gz: 49bf98de660939233cfdd7c256d4976dea3438ebaaf1bfd3b31dfa273d5b4d9da07e86cef98336fdc2178cfa56c368f5d68593c0449e424c8f9982dcb8d4155f
7
+ data.tar.gz: 5a78302e03fb52cb2e8ad69019ed3ed3be4cdc13f9ab86a86231013d8ca574595da34c00bc65ee6336a624cebad7d0ccd1b761eaffa3f6e3bc711fdcdb5cbbfc
@@ -554,19 +554,6 @@ struct StackTable {
554
554
  }
555
555
  }
556
556
 
557
- // FIXME: probably should remove
558
- void clear() {
559
- frame_map.clear();
560
- func_map.clear();
561
- func_info_list.clear();
562
-
563
- {
564
- const std::lock_guard<std::mutex> lock(stack_mutex);
565
- stack_node_list.clear();
566
- root_stack_node.children.clear();
567
- }
568
- }
569
-
570
557
  StackNode *convert_stack(StackTable &other, int original_idx) {
571
558
  if (original_idx < 0) {
572
559
  return &root_stack_node;
@@ -685,6 +672,10 @@ StackTable::stack_table_convert(VALUE self, VALUE original_tableval, VALUE origi
685
672
  StackTable *original_table = get_stack_table(original_tableval);
686
673
  int original_idx = NUM2INT(original_idxval);
687
674
 
675
+ if (original_idx == -1) {
676
+ return original_idxval;
677
+ }
678
+
688
679
  int original_size;
689
680
  {
690
681
  const std::lock_guard<std::mutex> lock(original_table->stack_mutex);
@@ -213,7 +213,6 @@ module Vernier
213
213
  @profile = profile
214
214
  @categorizer = categorizer
215
215
  @tid = tid
216
- @allocations = allocations
217
216
  @name = name
218
217
  @is_main = is_main
219
218
  if is_main.nil?
@@ -227,6 +226,15 @@ module Vernier
227
226
 
228
227
  @samples = samples
229
228
 
229
+ if allocations
230
+ allocation_samples = allocations[:samples].dup
231
+ allocation_samples.map! do |sample|
232
+ @stack_table.convert(profile._stack_table, sample)
233
+ end
234
+ allocations = allocations.merge(samples: allocation_samples)
235
+ end
236
+ @allocations = allocations
237
+
230
238
  timestamps ||= [0] * samples.size
231
239
  @weights, @timestamps = weights, timestamps
232
240
  @sample_categories = sample_categories || ([0] * samples.size)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vernier
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
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: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Hawthorn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-01 00:00:00.000000000 Z
11
+ date: 2024-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport