sigdump 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +5 -0
- data/lib/sigdump.rb +12 -8
- data/lib/sigdump/setup.rb +1 -4
- metadata +2 -2
data/ChangeLog
CHANGED
data/lib/sigdump.rb
CHANGED
@@ -1,20 +1,24 @@
|
|
1
1
|
module Sigdump
|
2
|
-
VERSION = "0.
|
2
|
+
VERSION = "0.2.0"
|
3
3
|
|
4
|
-
def self.
|
4
|
+
def self.setup(signal=ENV['SIGDUMP_SIGNAL'] || 'SIGCONT', path=ENV['SIGDUMP_PATH'])
|
5
5
|
Kernel.trap(signal) do
|
6
6
|
begin
|
7
|
-
|
8
|
-
io.write "Sigdump at #{Time.now} process #{Process.pid} (#{$0})\n"
|
9
|
-
dump_all_thread_backtrace(io)
|
10
|
-
dump_object_count(io)
|
11
|
-
dump_gc_profiler_result(io)
|
12
|
-
end
|
7
|
+
dump(path)
|
13
8
|
rescue
|
14
9
|
end
|
15
10
|
end
|
16
11
|
end
|
17
12
|
|
13
|
+
def self.dump(path=ENV['SIGDUMP_PATH'])
|
14
|
+
_open_dump_path(path) do |io|
|
15
|
+
io.write "Sigdump at #{Time.now} process #{Process.pid} (#{$0})\n"
|
16
|
+
dump_all_thread_backtrace(io)
|
17
|
+
dump_object_count(io)
|
18
|
+
dump_gc_profiler_result(io)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
18
22
|
def self.dump_all_thread_backtrace(io)
|
19
23
|
Thread.list.each do |thread|
|
20
24
|
dump_backtrace(thread, io)
|
data/lib/sigdump/setup.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sigdump
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
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: 2013-04-
|
12
|
+
date: 2013-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|