perftools.rb 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/ext/extconf.rb CHANGED
@@ -48,7 +48,8 @@ Dir.chdir('src') do
48
48
  ['perftools-osx-106', RUBY_PLATFORM =~ /darwin10/],
49
49
  ['perftools-debug', true],
50
50
  ['perftools-realtime', true],
51
- ['perftools-objects', true]
51
+ ['perftools-objects', true],
52
+ ['perftools-frames', true]
52
53
  ].each do |patch, apply|
53
54
  if apply
54
55
  sys("patch -p1 < ../../../patches/#{patch}.patch")
data/ext/perftools.c CHANGED
@@ -44,6 +44,7 @@ static VALUE Isend;
44
44
  void
45
45
  segv_handler(int sig)
46
46
  {
47
+ fprintf(stderr, "*** Caught a segfault during stack trace sampling!\n");
47
48
  assert(saved_handler);
48
49
  _longjmp(saved_location, 1);
49
50
  }
@@ -86,13 +87,13 @@ static VALUE Isend;
86
87
  }
87
88
 
88
89
  // XXX SIGPROF can come in while ruby_frame is in an inconsistent state (rb_call0), so we ignore the top-most frame
89
- if (frame->last_func) {
90
+ if (frame->last_func && frame->last_class) {
90
91
  self = frame->self;
91
92
  klass = frame->last_class;
92
93
  method = frame->last_func;
93
94
  SAVE_FRAME();
94
95
  }
95
- */
96
+ /**/
96
97
 
97
98
  for (; frame && (n = frame->node); frame = frame->prev) {
98
99
  if (frame->prev && frame->prev->last_func) {
@@ -349,7 +350,7 @@ methprofiler_setup()
349
350
  if (bMethProfilerRunning)
350
351
  return Qtrue;
351
352
 
352
- rb_add_event_hook(event_handler, RUBY_EVENT_CALL);
353
+ rb_add_event_hook(event_handler, RUBY_EVENT_CALL|RUBY_EVENT_C_CALL);
353
354
 
354
355
  bMethProfilerRunning = Qtrue;
355
356
  return Qtrue;
@@ -0,0 +1,13 @@
1
+ diff --git a/src/profiledata.h b/src/profiledata.h
2
+ index ccdf96f..0517614 100644
3
+ --- a/src/profiledata.h
4
+ +++ b/src/profiledata.h
5
+ @@ -106,7 +106,7 @@ class ProfileData {
6
+ int frequency_; // Sample frequency.
7
+ };
8
+
9
+ - static const int kMaxStackDepth = 64; // Max stack depth stored in profile
10
+ + static const int kMaxStackDepth = 300; // Max stack depth stored in profile
11
+
12
+ ProfileData();
13
+ ~ProfileData();
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.1'
3
+ s.version = '0.5.2'
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
- - 1
9
- version: 0.5.1
8
+ - 2
9
+ version: 0.5.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Aman Gupta
@@ -35,6 +35,7 @@ files:
35
35
  - objalloc_tests/Makefile
36
36
  - objalloc_tests/trap.c
37
37
  - patches/perftools-debug.patch
38
+ - patches/perftools-frames.patch
38
39
  - patches/perftools-gc.patch
39
40
  - patches/perftools-notests.patch
40
41
  - patches/perftools-objects.patch