allocation_tracer 0.4.0 → 0.4.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
  SHA1:
3
- metadata.gz: 94f2c93cda609ede0ad42efbd3fa6121f99e5059
4
- data.tar.gz: a17dd435501dcce52e55fbf081201cbc80f1c724
3
+ metadata.gz: a78ab5afb661776f40b461268284d07e8774b56c
4
+ data.tar.gz: eea35b335ca74adc44b124c807def5c127b5512f
5
5
  SHA512:
6
- metadata.gz: 2a76d3201a4aed46cd935b0a6339a4138c9ba45d13f74e5228e0bc30320f68790720f29ad3ed389f21a3c24c0f382369a4966d325b23d290e163bc98b389650b
7
- data.tar.gz: 2979c9185bb4ad81bb7b1f7cea46fbe2763ce0eec45b807f1b7b071f68a793b682a089153c2438664f35b4e4a4ca1ae01a1723a19e97beae52b1406083854433
6
+ metadata.gz: 380a0ffdb0478d0adbe8530681e13806e41955c4baddb39919ff353b206e9b4362627077d89b089e4377da089afc1b02ab73ed71845c49f57414ebfb878a0a93
7
+ data.tar.gz: 75dd1e0a3b72427801147909660942611ffcff99f7e95775d19d6d0fb15cc4dcfb431a2e527259a58b6fb669f84999d66d3e69b629288f4afe0b981df7f66b76
@@ -294,7 +294,7 @@ aggregate_each_info(struct traceobj_arg *arg, struct allocation_info *info, size
294
294
  }
295
295
  key = (st_data_t)key_buff;
296
296
 
297
- /* count, total age, max age, min age */
297
+ /* count, old count, total age, max age, min age */
298
298
  val_buff = ALLOC_N(size_t, 6);
299
299
  val_buff[0] = val_buff[1] = val_buff[2] = 0;
300
300
  val_buff[3] = val_buff[4] = age;
@@ -309,7 +309,12 @@ aggregate_each_info(struct traceobj_arg *arg, struct allocation_info *info, size
309
309
  }
310
310
 
311
311
  val_buff[0] += 1;
312
+ #ifdef FL_PROMOTED
312
313
  if (info->flags & FL_PROMOTED) val_buff[1] += 1;
314
+ #elif defined(FL_PROMOTED0) && defined(FL_PROMOTED1)
315
+ if (info->flags & FL_PROMOTED0 &&
316
+ info->flags & FL_PROMOTED1) val_buff[1] += 1;
317
+ #endif
313
318
  val_buff[2] += age;
314
319
  if (val_buff[3] > age) val_buff[3] = age; /* min */
315
320
  if (val_buff[4] < age) val_buff[4] = age; /* max */
@@ -585,12 +590,12 @@ aggregate_result_i(st_data_t key, st_data_t val, void *data)
585
590
 
586
591
  if (aar->update && (oldv = rb_hash_aref(result, k)) != Qnil) {
587
592
  v = rb_ary_new3(6,
588
- INT2FIX(val_buff[0] + FIX2INT(RARRAY_AREF(oldv, 0))), /* count */
589
- INT2FIX(val_buff[1] + FIX2INT(RARRAY_AREF(oldv, 1))), /* old count */
590
- INT2FIX(val_buff[2] + FIX2INT(RARRAY_AREF(oldv, 2))), /* total_age */
591
- INT2FIX(MIN(val_buff[3], FIX2INT(RARRAY_AREF(oldv, 3)))), /* min age */
592
- INT2FIX(MAX(val_buff[4], FIX2INT(RARRAY_AREF(oldv, 4)))), /* max age */
593
- INT2FIX(val_buff[5] + FIX2INT(RARRAY_AREF(oldv, 5)))); /* memsize_of */
593
+ INT2FIX(val_buff[0] + (size_t)FIX2INT(RARRAY_AREF(oldv, 0))), /* count */
594
+ INT2FIX(val_buff[1] + (size_t)FIX2INT(RARRAY_AREF(oldv, 1))), /* old count */
595
+ INT2FIX(val_buff[2] + (size_t)FIX2INT(RARRAY_AREF(oldv, 2))), /* total_age */
596
+ INT2FIX(MIN(val_buff[3], (size_t)FIX2INT(RARRAY_AREF(oldv, 3)))), /* min age */
597
+ INT2FIX(MAX(val_buff[4], (size_t)FIX2INT(RARRAY_AREF(oldv, 4)))), /* max age */
598
+ INT2FIX(val_buff[5] + (size_t)FIX2INT(RARRAY_AREF(oldv, 5)))); /* memsize_of */
594
599
  }
595
600
  else {
596
601
  v = rb_ary_new3(6,
@@ -649,12 +654,6 @@ lifetime_table_for_live_objects_i(st_data_t key, st_data_t val, st_data_t data)
649
654
  return ST_CONTINUE;
650
655
  }
651
656
 
652
- static int
653
- st_size(struct st_table *st)
654
- {
655
- return st->num_bins;
656
- }
657
-
658
657
  static VALUE
659
658
  aggregate_result(struct traceobj_arg *arg)
660
659
  {
@@ -1,3 +1,3 @@
1
1
  module ObjectSpace::AllocationTracer
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allocation_tracer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koichi Sasada
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-22 00:00:00.000000000 Z
11
+ date: 2014-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.2.2
111
+ rubygems_version: 2.4.2
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: allocation_tracer gem adds ObjectSpace::AllocationTracer module.