chrisa-ruby-dtrace 0.2.3 → 0.2.4
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/History.txt +1 -1
- data/README.txt +12 -7
- data/lib/dtrace/version.rb +1 -1
- data/plugin/dtrace/lib/dtracer.rb +4 -4
- metadata +3 -3
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
Ruby-DTrace is Ruby bindings for Dtrace, which allows you to add
|
2
|
+
DTrace probes to your Ruby programs, and to write D-based programs
|
3
|
+
with Ruby.
|
3
4
|
|
4
5
|
== FEATURES
|
5
6
|
|
@@ -13,12 +14,14 @@ Consumer:
|
|
13
14
|
|
14
15
|
Probes:
|
15
16
|
|
16
|
-
* Create USDT providers from Ruby
|
17
|
+
* Create USDT providers from Ruby, at runtime.
|
17
18
|
* No code-generation or gcc/linker dependency
|
18
19
|
|
19
20
|
== SYNOPSIS
|
20
21
|
|
21
|
-
Consumer:
|
22
|
+
Consumer: see Dtrace
|
23
|
+
|
24
|
+
require 'Dtrace'
|
22
25
|
|
23
26
|
t = Dtrace.new
|
24
27
|
progtext = 'ruby$1:::function-entry{ @a[strjoin(strjoin(copyinstr(arg0),"."),copyinstr(arg1))] = count(); } END { printa(@a); }'
|
@@ -34,7 +37,9 @@ Consumer:
|
|
34
37
|
# handle records
|
35
38
|
end
|
36
39
|
|
37
|
-
Probes:
|
40
|
+
Probes: see Dtrace::Provider
|
41
|
+
|
42
|
+
require 'dtrace/provider'
|
38
43
|
|
39
44
|
Dtrace::Provider.create :rubyprog do |p|
|
40
45
|
p.probe :foo, :string, :string
|
@@ -62,11 +67,11 @@ Probes:
|
|
62
67
|
|
63
68
|
== INSTALL
|
64
69
|
|
65
|
-
$ sudo gem install ruby-dtrace
|
70
|
+
$ sudo gem install chrisa-ruby-dtrace --source=http://gems.github.com
|
66
71
|
|
67
72
|
== LICENSE
|
68
73
|
|
69
|
-
Copyright (c)
|
74
|
+
Copyright (c) 2008 Chris Andrews <chris@nodnol.org>
|
70
75
|
|
71
76
|
Permission is hereby granted, free of charge, to any person obtaining
|
72
77
|
a copy of this software and associated documentation files (the
|
data/lib/dtrace/version.rb
CHANGED
@@ -15,7 +15,7 @@ class Dtracer
|
|
15
15
|
@d = Dtrace.new
|
16
16
|
@d.setopt("aggsize", "4m")
|
17
17
|
@d.setopt("bufsize", "4m")
|
18
|
-
rescue
|
18
|
+
rescue Dtrace::Exception => e
|
19
19
|
@logger.warn("DTrace start setup: #{e.message}")
|
20
20
|
return
|
21
21
|
end
|
@@ -24,7 +24,7 @@ class Dtracer
|
|
24
24
|
prog = @d.compile(@dprogram, pid.to_s)
|
25
25
|
prog.execute
|
26
26
|
@d.go
|
27
|
-
rescue
|
27
|
+
rescue Dtrace::Exception => e
|
28
28
|
@logger.warn("DTrace start compile: #{e.message}")
|
29
29
|
end
|
30
30
|
end
|
@@ -35,11 +35,11 @@ class Dtracer
|
|
35
35
|
|
36
36
|
dtrace_data = nil
|
37
37
|
begin
|
38
|
-
c =
|
38
|
+
c = Dtrace::Consumer.new(@d)
|
39
39
|
c.consume_once do |d|
|
40
40
|
dtrace_data = d
|
41
41
|
end
|
42
|
-
rescue
|
42
|
+
rescue Dtrace::Exception => e
|
43
43
|
@logger.warn("DTrace end: #{e.message}")
|
44
44
|
end
|
45
45
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chrisa-ruby-dtrace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Andrews
|
@@ -20,8 +20,8 @@ executables: []
|
|
20
20
|
extensions:
|
21
21
|
- ext/extconf.rb
|
22
22
|
- ext/dof/extconf.rb
|
23
|
-
extra_rdoc_files:
|
24
|
-
|
23
|
+
extra_rdoc_files:
|
24
|
+
- README.txt
|
25
25
|
files:
|
26
26
|
- examples/scsi.rb
|
27
27
|
- ext/dof
|