stackprofx 0.2.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -7
- data/ext/stackprofx.c +1 -1
- data/stackprofx.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e68b8cf2478f6e776337e01d232a6dfce79de54d
|
4
|
+
data.tar.gz: 6536395b81c54d9976de0121815c3c7649e11106
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79aa0a6a6f0998ec1134ba9248f37826037613eb5cf69887dc04952d8576aef6d723b784034db3d768e7d515d6e073ed261a031405814433b1251d7012273593
|
7
|
+
data.tar.gz: 56d170cfec4aa66acae6a7d783d6d3322ce56bf19d7c8e0fad44f0219cdc0d334fb66c3a9b0453bb10bbc618a3d8391d255cb2549b618afd73d32d1019e7dbdb
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -10,18 +10,16 @@ should accept.
|
|
10
10
|
I was considering calling it stackprof2, but 2 implies a successor to 1
|
11
11
|
and this is in no way "better" than the original project.
|
12
12
|
|
13
|
-
[1]: https://github.com/tmm1/stackprof
|
14
|
-
|
15
13
|
### What changes?
|
16
14
|
|
17
15
|
`StackProf::run` accepts an options hash to specify profiling parameters.
|
18
16
|
Stackprofx adds one more (optional) key: `:threads`. The value for `:threads`
|
19
|
-
should be an array of [`Thread`][
|
17
|
+
should be an array of [`Thread`][2] objects to be profiled. All other threads
|
20
18
|
will be ignored.
|
21
19
|
|
22
20
|
Even if the `:threads` key is not specified, the behaviour of Stackprofx is
|
23
21
|
slightly different. `stackprof` makes use of the `rb_profile_frames()` function
|
24
|
-
added to MRI 2.1, but this thread is [limited][
|
22
|
+
added to MRI 2.1, but this thread is [limited][3] to only profiling whatever
|
25
23
|
happens to be the "current thread" when the profiling signal is received by
|
26
24
|
the Ruby process. Stackprofx will profile every running thread.
|
27
25
|
|
@@ -30,12 +28,13 @@ To do this, Stackprofx pulls in a bunch of private Ruby headers and reimplements
|
|
30
28
|
(probably will) break in the future, but it's for development, not production,
|
31
29
|
right?
|
32
30
|
|
33
|
-
[1]: http://ruby-doc.org/core-2.1.5/Thread.html
|
34
|
-
[2]: https://bugs.ruby-lang.org/issues/10602
|
35
|
-
|
36
31
|
### TODO
|
37
32
|
|
38
33
|
* Investigate terrible hacks required to link against Ruby
|
39
34
|
* Make stack deduplication (weights) useful again
|
40
35
|
* Less mess
|
41
36
|
* Ask someone who knows something about the Ruby GC to review
|
37
|
+
|
38
|
+
[1]: https://github.com/tmm1/stackprof
|
39
|
+
[2]: http://ruby-doc.org/core-2.1.5/Thread.html
|
40
|
+
[3]: https://bugs.ruby-lang.org/issues/10602
|
data/ext/stackprofx.c
CHANGED
@@ -415,7 +415,7 @@ stackprofx_record_sample_i(st_data_t key, st_data_t val, st_data_t arg)
|
|
415
415
|
|
416
416
|
rb_thread_t *th;
|
417
417
|
GetThreadPtr((VALUE)key, th);
|
418
|
-
if (th->status
|
418
|
+
if (th->status != THREAD_RUNNABLE) return ST_CONTINUE;
|
419
419
|
|
420
420
|
num = rb_profile_frames_thread(0, sizeof(_stackprofx.frames_buffer) / sizeof(VALUE), _stackprofx.frames_buffer, _stackprofx.lines_buffer, th);
|
421
421
|
|
data/stackprofx.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stackprofx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aman Gupta
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-01-
|
12
|
+
date: 2015-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake-compiler
|