ruby-prof 0.7.8 → 0.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -48,8 +48,8 @@ EOF
48
48
 
49
49
  spec.version = RUBY_PROF_VERSION
50
50
 
51
- spec.author = "Shugo Maeda and Charlie Savage"
52
- spec.email = "shugo@ruby-lang.org and cfis@savagexi.com"
51
+ spec.author = "Shugo Maeda, Charlie Savage, Roger Pack"
52
+ spec.email = "shugo@ruby-lang.org, cfis@savagexi.com, rogerdpack@gmail.com"
53
53
  spec.platform = Gem::Platform::RUBY
54
54
  spec.require_path = "lib"
55
55
  spec.bindir = "bin"
@@ -62,9 +62,8 @@ EOF
62
62
  spec.required_ruby_version = '>= 1.8.4'
63
63
  spec.date = DateTime.now
64
64
  spec.rubyforge_project = 'ruby-prof'
65
+ spec.add_development_dependency 'os'
65
66
 
66
- # rdoc
67
- spec.has_rdoc = true
68
67
  end
69
68
 
70
69
  # Rake task to build the default package
@@ -124,8 +123,7 @@ end
124
123
 
125
124
  require 'fileutils'
126
125
 
127
-
128
- desc 'Build ruby_prof.so with debug symbols on'
126
+ desc 'Build ruby_prof.so with debug output on'
129
127
  task :build do
130
128
  build(true)
131
129
  end
@@ -150,7 +148,6 @@ task :build_no_debug do
150
148
  build(false)
151
149
  end
152
150
 
153
- desc 'clean ext'
154
151
  task :clean do
155
152
  FileUtils.rm 'lib/ruby_prof.so' if File.exist? 'lib/ruby_prof.so'
156
153
  Dir.chdir('ext') do
@@ -162,4 +159,5 @@ task :clean do
162
159
  FileUtils.rm file
163
160
  end
164
161
  end
162
+ system("rm -rf pkg")
165
163
  end
data/ext/ruby_prof.c CHANGED
@@ -1204,8 +1204,11 @@ prof_event_hook(rb_event_flag_t event, NODE *node, VALUE self, ID mid, VALUE kla
1204
1204
  {
1205
1205
  frame = pop_frame(thread_data, now);
1206
1206
  #ifdef RUBY_VM
1207
- // we need to go up the stack to find the right one [http://redmine.ruby-lang.org/issues/show/2610] (for now)
1208
- while( (frame->call_info->target->key->mid != mid) || (frame->call_info->target->key->klass != klass)){
1207
+ // we need to walk up the stack to find the right one [http://redmine.ruby-lang.org/issues/show/2610] (for now)
1208
+ // sometimes frames don't have line and source somehow [like blank]
1209
+ // if we hit one there's not much we can do...I guess...
1210
+ // or maybe we don't have one because we're at the top or something.
1211
+ while( frame->call_info->target->key->mid && frame->call_info->target->key->klass && ((frame->call_info->target->key->mid != mid) || (frame->call_info->target->key->klass != klass))){
1209
1212
  frame = pop_frame(thread_data, now);
1210
1213
  }
1211
1214
  #endif
data/ext/version.h CHANGED
@@ -1,4 +1,4 @@
1
- #define RUBY_PROF_VERSION "0.7.8"
1
+ #define RUBY_PROF_VERSION "0.7.9"
2
2
  #define RUBY_PROF_VERSION_MAJ 0
3
3
  #define RUBY_PROF_VERSION_MIN 7
4
- #define RUBY_PROF_VERSION_MIC 8
4
+ #define RUBY_PROF_VERSION_MIC 9
File without changes
data/test/exec_test.rb ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'test/unit'
4
+ require 'os'
5
+
6
+ # -- Test for bug when it loads with no frames
7
+
8
+ class EnumerableTest < Test::Unit::TestCase
9
+ def test_being_able_to_run_its_binary
10
+ Dir.chdir(File.dirname(__FILE__)) do
11
+ assert system(OS.ruby_bin + " ruby-prof-bin do_nothing.rb")
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,20 @@
1
+ #!E:/installs/ruby191p376/bin/ruby.exe
2
+ #
3
+ # This file was generated by RubyGems.
4
+ #
5
+ # The application 'ruby-prof' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'rubygems'
10
+
11
+ version = ">= 0"
12
+
13
+ if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
14
+ version = $1
15
+ ARGV.shift
16
+ end
17
+
18
+ #gem 'ruby-prof', version
19
+ $: << File.dirname(__FILE__) + '/../lib'
20
+ load File.dirname(__FILE__) + '/../bin/ruby-prof'
metadata CHANGED
@@ -1,18 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-prof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.8
4
+ version: 0.7.9
5
5
  platform: ruby
6
6
  authors:
7
- - Shugo Maeda and Charlie Savage
7
+ - Shugo Maeda, Charlie Savage, Roger Pack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
12
  date: 2010-01-15 00:00:00 -07:00
13
13
  default_executable:
14
- dependencies: []
15
-
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: os
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
16
25
  description: |
17
26
  ruby-prof is a fast code profiler for Ruby. It is a C extension and
18
27
  therefore is many times faster than the standard Ruby profiler. It
@@ -21,7 +30,7 @@ description: |
21
30
  methods it called. RubyProf generate both text and html and can output
22
31
  it to standard out or to a file.
23
32
 
24
- email: shugo@ruby-lang.org and cfis@savagexi.com
33
+ email: shugo@ruby-lang.org, cfis@savagexi.com, rogerdpack@gmail.com
25
34
  executables:
26
35
  - ruby-prof
27
36
  extensions:
@@ -72,10 +81,12 @@ files:
72
81
  - test/aggregate_test.rb
73
82
  - test/basic_test.rb
74
83
  - test/current_failures_windows
84
+ - test/do_nothing.rb
75
85
  - test/duplicate_names_test.rb
76
86
  - test/enumerable_test.rb
77
87
  - test/exceptions_test.rb
78
88
  - test/exclude_threads_test.rb
89
+ - test/exec_test.rb
79
90
  - test/line_number_test.rb
80
91
  - test/measurement_test.rb
81
92
  - test/module_test.rb
@@ -84,6 +95,7 @@ files:
84
95
  - test/prime_test.rb
85
96
  - test/printers_test.rb
86
97
  - test/recursive_test.rb
98
+ - test/ruby-prof-bin
87
99
  - test/singleton_test.rb
88
100
  - test/stack_test.rb
89
101
  - test/start_stop_test.rb