rbtrace 0.4.6 → 0.4.7
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/README.md +2 -2
- data/ext/rbtrace.c +3 -0
- data/lib/rbtrace/cli.rb +1 -1
- data/lib/rbtrace/rbtracer.rb +12 -6
- data/lib/rbtrace/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -3,7 +3,8 @@
|
|
3
3
|
rbtrace shows you method calls happening inside another ruby process in real
|
4
4
|
time.
|
5
5
|
|
6
|
-
rbtrace works on ruby 1.8 and
|
6
|
+
rbtrace works on ruby 1.8 through 2.2 (and beyond), running on linux or mac
|
7
|
+
osx.
|
7
8
|
|
8
9
|
rbtrace is designed to have minimal overhead, and should be safe to run
|
9
10
|
in production.
|
@@ -197,4 +198,3 @@ for popular ruby libraries and functions.
|
|
197
198
|
* add special expressions for method args (_arg0_, _arguments_)
|
198
199
|
* optimize local variable lookup to avoid instance_eval
|
199
200
|
* investigate mach_msg on osx since msgget(2) has hard kernel limits
|
200
|
-
|
data/ext/rbtrace.c
CHANGED
data/lib/rbtrace/cli.rb
CHANGED
@@ -322,7 +322,7 @@ EOS
|
|
322
322
|
if opts[:exec_given]
|
323
323
|
tracee = fork{
|
324
324
|
Process.setsid
|
325
|
-
ENV['RUBYOPT'] = "-r#{File.expand_path('../../
|
325
|
+
ENV['RUBYOPT'] = "-r#{File.expand_path('../../rbtrace',__FILE__)}"
|
326
326
|
exec(*opts[:exec])
|
327
327
|
}
|
328
328
|
STDERR.puts "*** spawned child #{tracee}: #{opts[:exec].inspect[1..-2]}"
|
data/lib/rbtrace/rbtracer.rb
CHANGED
@@ -246,16 +246,22 @@ class RBTracer
|
|
246
246
|
|
247
247
|
# Process events from the traced process.
|
248
248
|
#
|
249
|
-
# Returns nothing
|
249
|
+
# Returns nothing
|
250
250
|
def recv_loop
|
251
251
|
while true
|
252
|
-
|
253
|
-
|
252
|
+
ready = IO.select([@sock], nil, nil, 1)
|
253
|
+
|
254
|
+
if ready
|
255
|
+
# block until a message arrives
|
256
|
+
process_line(recv_cmd)
|
257
|
+
# process any remaining messages
|
258
|
+
recv_lines
|
259
|
+
else
|
260
|
+
Process.kill(0, @pid)
|
261
|
+
end
|
254
262
|
|
255
|
-
# process any remaining messages
|
256
|
-
recv_lines
|
257
263
|
end
|
258
|
-
rescue Errno::EINVAL, Errno::EIDRM
|
264
|
+
rescue Errno::EINVAL, Errno::EIDRM, Errno::ESRCH
|
259
265
|
# process went away
|
260
266
|
end
|
261
267
|
|
data/lib/rbtrace/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbtrace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-02-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|