perftools.rb 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/ext/perftools.c +11 -0
  2. data/perftools.rb.gemspec +1 -1
  3. metadata +5 -3
data/ext/perftools.c CHANGED
@@ -339,10 +339,17 @@ uc_get_ip(ucontext_t *uc) {
339
339
  return (char**)&uc->program_counter;
340
340
  }
341
341
 
342
+ #ifdef RB_EVENT_HOOKS_HAVE_CALLBACK_DATA
343
+ static void
344
+ event_handler(rb_event_flag_t event, VALUE data, VALUE self, ID id, VALUE klass) {
345
+ ProfilerRecord(0, NULL, NULL);
346
+ }
347
+ #else
342
348
  static void
343
349
  event_handler(rb_event_t event, NODE *node, VALUE self, ID id, VALUE klass) {
344
350
  ProfilerRecord(0, NULL, NULL);
345
351
  }
352
+ #endif
346
353
 
347
354
  static VALUE
348
355
  methprofiler_setup()
@@ -350,7 +357,11 @@ methprofiler_setup()
350
357
  if (bMethProfilerRunning)
351
358
  return Qtrue;
352
359
 
360
+ #ifdef RB_EVENT_HOOKS_HAVE_CALLBACK_DATA
361
+ rb_add_event_hook(event_handler, RUBY_EVENT_CALL|RUBY_EVENT_C_CALL, 0);
362
+ #else
353
363
  rb_add_event_hook(event_handler, RUBY_EVENT_CALL|RUBY_EVENT_C_CALL);
364
+ #endif
354
365
 
355
366
  bMethProfilerRunning = Qtrue;
356
367
  return Qtrue;
data/perftools.rb.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'perftools.rb'
3
- s.version = '0.5.3'
3
+ s.version = '0.5.4'
4
4
  s.date = '2010-11-12'
5
5
  s.rubyforge_project = 'perftools-rb'
6
6
  s.summary = 'google-perftools for ruby code'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 3
9
- version: 0.5.3
8
+ - 4
9
+ version: 0.5.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Aman Gupta
@@ -53,6 +53,7 @@ rdoc_options: []
53
53
  require_paths:
54
54
  - lib
55
55
  required_ruby_version: !ruby/object:Gem::Requirement
56
+ none: false
56
57
  requirements:
57
58
  - - ">="
58
59
  - !ruby/object:Gem::Version
@@ -60,6 +61,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
61
  - 0
61
62
  version: "0"
62
63
  required_rubygems_version: !ruby/object:Gem::Requirement
64
+ none: false
63
65
  requirements:
64
66
  - - ">="
65
67
  - !ruby/object:Gem::Version
@@ -69,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
71
  requirements: []
70
72
 
71
73
  rubyforge_project: perftools-rb
72
- rubygems_version: 1.3.6
74
+ rubygems_version: 1.3.7
73
75
  signing_key:
74
76
  specification_version: 3
75
77
  summary: google-perftools for ruby code