motion-dtrace 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -2
- data/lib/motion-dtrace.rb +8 -1
- data/lib/motion-dtrace/version.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
motion-dtrace
|
2
2
|
=============
|
3
3
|
|
4
|
-
Proof of concept to use dtrace on rubymotion.
|
4
|
+
Proof of concept to use dtrace on rubymotion. Check the demo at [You Tube](https://github.com/siuying/motion-dtrace).
|
5
5
|
|
6
6
|
Installation
|
7
7
|
------------
|
@@ -13,7 +13,6 @@ gem install motion-dtrace
|
|
13
13
|
Usage
|
14
14
|
-----
|
15
15
|
|
16
|
-
|
17
16
|
1. Edit the Rakefile of your RubyMotion project and add the following require line.
|
18
17
|
|
19
18
|
```
|
data/lib/motion-dtrace.rb
CHANGED
@@ -4,5 +4,12 @@ task :dtrace do
|
|
4
4
|
trace_pid = `ps ax | grep -P 'iPhone Simulator/[0-9\.]+/Applications/[^/]+/[^/]+\.app' | awk '{print $1}'`
|
5
5
|
command = "sudo dtrace -qs #{trace_file} -p #{trace_pid}"
|
6
6
|
puts "#{command}"
|
7
|
-
exec command
|
7
|
+
pid = fork { exec command }
|
8
|
+
|
9
|
+
Signal.trap("HUP") do
|
10
|
+
Process.kill("HUP", pid)
|
11
|
+
Process.wait(pid)
|
12
|
+
exit
|
13
|
+
end
|
14
|
+
Process.wait(pid)
|
8
15
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-dtrace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-05-29 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70343197186340 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70343197186340
|
25
25
|
description: use DTrace on motion
|
26
26
|
email:
|
27
27
|
- francis@ignition.hk
|