tracepoint 1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{HISTORY → HISTORY.rdoc} +14 -1
- data/LICENSE +203 -164
- data/{README → README.rdoc} +19 -17
- data/lib/tracepoint.rb +30 -28
- data/lib/tracepoint/meta/data.rb +20 -0
- data/lib/tracepoint/meta/package.yml +5 -0
- data/lib/tracepoint/meta/profile.yml +21 -0
- data/meta/data.rb +20 -0
- data/meta/package.yml +5 -0
- data/meta/profile.yml +21 -0
- data/test/{demo → demos}/trace.qed +2 -2
- metadata +34 -38
- data/MANIFEST +0 -20
- data/Syckfile +0 -81
- data/meta/authors +0 -1
- data/meta/collection +0 -1
- data/meta/copyright +0 -1
- data/meta/created +0 -1
- data/meta/description +0 -3
- data/meta/homepage +0 -1
- data/meta/license +0 -1
- data/meta/name +0 -1
- data/meta/released +0 -1
- data/meta/repository +0 -1
- data/meta/summary +0 -1
- data/meta/title +0 -1
- data/meta/version +0 -1
data/{HISTORY → HISTORY.rdoc}
RENAMED
@@ -1,6 +1,19 @@
|
|
1
1
|
= RELEASE HISTORY
|
2
2
|
|
3
|
-
== 1.
|
3
|
+
== 1.2.0 / 2010-08-05
|
4
|
+
|
5
|
+
This release fix a rare bug where the traced event provides
|
6
|
+
no binding. In this case we assume the TOPLEVEL_BINDING is at play.
|
7
|
+
This release also move the library to the Apache 2.0 license.
|
8
|
+
|
9
|
+
Changes:
|
10
|
+
|
11
|
+
* Licensed under the Apache 2.0 license.
|
12
|
+
* Default to TOPLEVEL_BINDING for events that provide no binding.
|
13
|
+
* Deprecated CodePoint alias of Binding.
|
14
|
+
|
15
|
+
|
16
|
+
== 1.1.0 / 2009-12-26
|
4
17
|
|
5
18
|
This release fixes multi-tracing and adds named traces.
|
6
19
|
|
data/LICENSE
CHANGED
@@ -1,166 +1,205 @@
|
|
1
|
-
|
1
|
+
.
|
2
|
+
|
3
|
+
Apache License
|
4
|
+
Version 2.0, January 2004
|
5
|
+
http://www.apache.org/licenses/
|
6
|
+
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
8
|
+
|
9
|
+
1. Definitions.
|
10
|
+
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
13
|
+
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
15
|
+
the copyright owner that is granting the License.
|
16
|
+
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
18
|
+
other entities that control, are controlled by, or are under common
|
19
|
+
control with that entity. For the purposes of this definition,
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
21
|
+
direction or management of such entity, whether by contract or
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
24
|
+
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
26
|
+
exercising permissions granted by this License.
|
27
|
+
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
29
|
+
including but not limited to software source code, documentation
|
30
|
+
source, and configuration files.
|
31
|
+
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
33
|
+
transformation or translation of a Source form, including but
|
34
|
+
not limited to compiled object code, generated documentation,
|
35
|
+
and conversions to other media types.
|
36
|
+
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
38
|
+
Object form, made available under the License, as indicated by a
|
39
|
+
copyright notice that is included in or attached to the work
|
40
|
+
(an example is provided in the Appendix below).
|
41
|
+
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
48
|
+
the Work and Derivative Works thereof.
|
49
|
+
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
51
|
+
the original version of the Work and any modifications or additions
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
63
|
+
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
66
|
+
subsequently incorporated within the Work.
|
67
|
+
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
74
|
+
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
80
|
+
where such license applies only to those patent claims licensable
|
81
|
+
by such Contributor that are necessarily infringed by their
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
84
|
+
institute patent litigation against any entity (including a
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
87
|
+
or contributory patent infringement, then any patent licenses
|
88
|
+
granted to You under this License for that Work shall terminate
|
89
|
+
as of the date such litigation is filed.
|
90
|
+
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
93
|
+
modifications, and in Source or Object form, provided that You
|
94
|
+
meet the following conditions:
|
95
|
+
|
96
|
+
(a) You must give any other recipients of the Work or
|
97
|
+
Derivative Works a copy of this License; and
|
98
|
+
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
100
|
+
stating that You changed the files; and
|
101
|
+
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
104
|
+
attribution notices from the Source form of the Work,
|
105
|
+
excluding those notices that do not pertain to any part of
|
106
|
+
the Derivative Works; and
|
107
|
+
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
110
|
+
include a readable copy of the attribution notices contained
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
113
|
+
of the following places: within a NOTICE text file distributed
|
114
|
+
as part of the Derivative Works; within the Source form or
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
116
|
+
within a display generated by the Derivative Works, if and
|
117
|
+
wherever such third-party notices normally appear. The contents
|
118
|
+
of the NOTICE file are for informational purposes only and
|
119
|
+
do not modify the License. You may add Your own attribution
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
122
|
+
that such additional attribution notices cannot be construed
|
123
|
+
as modifying the License.
|
124
|
+
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
126
|
+
may provide additional or different license terms and conditions
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
130
|
+
the conditions stated in this License.
|
131
|
+
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
135
|
+
this License, without any additional terms or conditions.
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
137
|
+
the terms of any separate license agreement you may have executed
|
138
|
+
with Licensor regarding such Contributions.
|
139
|
+
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
142
|
+
except as required for reasonable and customary use in describing the
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
144
|
+
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
154
|
+
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
160
|
+
incidental, or consequential damages of any character arising as a
|
161
|
+
result of this License or out of the use or inability to use the
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
164
|
+
other commercial damages or losses), even if such Contributor
|
165
|
+
has been advised of the possibility of such damages.
|
166
|
+
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
170
|
+
or other liability obligations and/or rights consistent with this
|
171
|
+
License. However, in accepting such obligations, You may act only
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
176
|
+
of your accepting any such warranty or additional liability.
|
177
|
+
|
178
|
+
END OF TERMS AND CONDITIONS
|
179
|
+
|
180
|
+
APPENDIX: How to apply the Apache License to your work.
|
181
|
+
|
182
|
+
To apply the Apache License to your work, attach the following
|
183
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
184
|
+
replaced with your own identifying information. (Don't include
|
185
|
+
the brackets!) The text should be enclosed in the appropriate
|
186
|
+
comment syntax for the file format. We also recommend that a
|
187
|
+
file or class name and description of purpose be included on the
|
188
|
+
same "printed page" as the copyright notice for easier
|
189
|
+
identification within third-party archives.
|
190
|
+
|
191
|
+
Copyright [yyyy] [name of copyright owner]
|
192
|
+
|
193
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
194
|
+
you may not use this file except in compliance with the License.
|
195
|
+
You may obtain a copy of the License at
|
196
|
+
|
197
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
198
|
+
|
199
|
+
Unless required by applicable law or agreed to in writing, software
|
200
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
201
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
202
|
+
See the License for the specific language governing permissions and
|
203
|
+
limitations under the License.
|
2
204
|
|
3
|
-
Version 3, 29 June 2007
|
4
|
-
|
5
|
-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
6
|
-
Everyone is permitted to copy and distribute verbatim copies
|
7
|
-
of this license document, but changing it is not allowed.
|
8
|
-
|
9
|
-
This version of the GNU Lesser General Public License incorporates
|
10
|
-
the terms and conditions of version 3 of the GNU General Public
|
11
|
-
License, supplemented by the additional permissions listed below.
|
12
|
-
|
13
|
-
== 0. Additional Definitions.
|
14
|
-
|
15
|
-
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16
|
-
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17
|
-
General Public License.
|
18
|
-
|
19
|
-
"The Library" refers to a covered work governed by this License,
|
20
|
-
other than an Application or a Combined Work as defined below.
|
21
|
-
|
22
|
-
An "Application" is any work that makes use of an interface provided
|
23
|
-
by the Library, but which is not otherwise based on the Library.
|
24
|
-
Defining a subclass of a class defined by the Library is deemed a mode
|
25
|
-
of using an interface provided by the Library.
|
26
|
-
|
27
|
-
A "Combined Work" is a work produced by combining or linking an
|
28
|
-
Application with the Library. The particular version of the Library
|
29
|
-
with which the Combined Work was made is also called the "Linked
|
30
|
-
Version".
|
31
|
-
|
32
|
-
The "Minimal Corresponding Source" for a Combined Work means the
|
33
|
-
Corresponding Source for the Combined Work, excluding any source code
|
34
|
-
for portions of the Combined Work that, considered in isolation, are
|
35
|
-
based on the Application, and not on the Linked Version.
|
36
|
-
|
37
|
-
The "Corresponding Application Code" for a Combined Work means the
|
38
|
-
object code and/or source code for the Application, including any data
|
39
|
-
and utility programs needed for reproducing the Combined Work from the
|
40
|
-
Application, but excluding the System Libraries of the Combined Work.
|
41
|
-
|
42
|
-
== 1. Exception to Section 3 of the GNU GPL.
|
43
|
-
|
44
|
-
You may convey a covered work under sections 3 and 4 of this License
|
45
|
-
without being bound by section 3 of the GNU GPL.
|
46
|
-
|
47
|
-
== 2. Conveying Modified Versions.
|
48
|
-
|
49
|
-
If you modify a copy of the Library, and, in your modifications, a
|
50
|
-
facility refers to a function or data to be supplied by an Application
|
51
|
-
that uses the facility (other than as an argument passed when the
|
52
|
-
facility is invoked), then you may convey a copy of the modified
|
53
|
-
version:
|
54
|
-
|
55
|
-
a) under this License, provided that you make a good faith effort to
|
56
|
-
ensure that, in the event an Application does not supply the
|
57
|
-
function or data, the facility still operates, and performs
|
58
|
-
whatever part of its purpose remains meaningful, or
|
59
|
-
|
60
|
-
b) under the GNU GPL, with none of the additional permissions of
|
61
|
-
this License applicable to that copy.
|
62
|
-
|
63
|
-
== 3. Object Code Incorporating Material from Library Header Files.
|
64
|
-
|
65
|
-
The object code form of an Application may incorporate material from
|
66
|
-
a header file that is part of the Library. You may convey such object
|
67
|
-
code under terms of your choice, provided that, if the incorporated
|
68
|
-
material is not limited to numerical parameters, data structure
|
69
|
-
layouts and accessors, or small macros, inline functions and templates
|
70
|
-
(ten or fewer lines in length), you do both of the following:
|
71
|
-
|
72
|
-
a) Give prominent notice with each copy of the object code that the
|
73
|
-
Library is used in it and that the Library and its use are
|
74
|
-
covered by this License.
|
75
|
-
|
76
|
-
b) Accompany the object code with a copy of the GNU GPL and this license
|
77
|
-
document.
|
78
|
-
|
79
|
-
== 4. Combined Works.
|
80
|
-
|
81
|
-
You may convey a Combined Work under terms of your choice that,
|
82
|
-
taken together, effectively do not restrict modification of the
|
83
|
-
portions of the Library contained in the Combined Work and reverse
|
84
|
-
engineering for debugging such modifications, if you also do each of
|
85
|
-
the following:
|
86
|
-
|
87
|
-
a) Give prominent notice with each copy of the Combined Work that
|
88
|
-
the Library is used in it and that the Library and its use are
|
89
|
-
covered by this License.
|
90
|
-
|
91
|
-
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92
|
-
document.
|
93
|
-
|
94
|
-
c) For a Combined Work that displays copyright notices during
|
95
|
-
execution, include the copyright notice for the Library among
|
96
|
-
these notices, as well as a reference directing the user to the
|
97
|
-
copies of the GNU GPL and this license document.
|
98
|
-
|
99
|
-
d) Do one of the following:
|
100
|
-
|
101
|
-
d.0) Convey the Minimal Corresponding Source under the terms of this
|
102
|
-
License, and the Corresponding Application Code in a form
|
103
|
-
suitable for, and under terms that permit, the user to
|
104
|
-
recombine or relink the Application with a modified version of
|
105
|
-
the Linked Version to produce a modified Combined Work, in the
|
106
|
-
manner specified by section 6 of the GNU GPL for conveying
|
107
|
-
Corresponding Source.
|
108
|
-
|
109
|
-
d.1) Use a suitable shared library mechanism for linking with the
|
110
|
-
Library. A suitable mechanism is one that (a) uses at run time
|
111
|
-
a copy of the Library already present on the user's computer
|
112
|
-
system, and (b) will operate properly with a modified version
|
113
|
-
of the Library that is interface-compatible with the Linked
|
114
|
-
Version.
|
115
|
-
|
116
|
-
e) Provide Installation Information, but only if you would otherwise
|
117
|
-
be required to provide such information under section 6 of the
|
118
|
-
GNU GPL, and only to the extent that such information is
|
119
|
-
necessary to install and execute a modified version of the
|
120
|
-
Combined Work produced by recombining or relinking the
|
121
|
-
Application with a modified version of the Linked Version. (If
|
122
|
-
you use option 4d0, the Installation Information must accompany
|
123
|
-
the Minimal Corresponding Source and Corresponding Application
|
124
|
-
Code. If you use option 4d1, you must provide the Installation
|
125
|
-
Information in the manner specified by section 6 of the GNU GPL
|
126
|
-
for conveying Corresponding Source.)
|
127
|
-
|
128
|
-
== 5. Combined Libraries.
|
129
|
-
|
130
|
-
You may place library facilities that are a work based on the
|
131
|
-
Library side by side in a single library together with other library
|
132
|
-
facilities that are not Applications and are not covered by this
|
133
|
-
License, and convey such a combined library under terms of your
|
134
|
-
choice, if you do both of the following:
|
135
|
-
|
136
|
-
a) Accompany the combined library with a copy of the same work based
|
137
|
-
on the Library, uncombined with any other library facilities,
|
138
|
-
conveyed under the terms of this License.
|
139
|
-
|
140
|
-
b) Give prominent notice with the combined library that part of it
|
141
|
-
is a work based on the Library, and explaining where to find the
|
142
|
-
accompanying uncombined form of the same work.
|
143
|
-
|
144
|
-
== 6. Revised Versions of the GNU Lesser General Public License.
|
145
|
-
|
146
|
-
The Free Software Foundation may publish revised and/or new versions
|
147
|
-
of the GNU Lesser General Public License from time to time. Such new
|
148
|
-
versions will be similar in spirit to the present version, but may
|
149
|
-
differ in detail to address new problems or concerns.
|
150
|
-
|
151
|
-
Each version is given a distinguishing version number. If the
|
152
|
-
Library as you received it specifies that a certain numbered version
|
153
|
-
of the GNU Lesser General Public License "or any later version"
|
154
|
-
applies to it, you have the option of following the terms and
|
155
|
-
conditions either of that published version or of any later version
|
156
|
-
published by the Free Software Foundation. If the Library as you
|
157
|
-
received it does not specify a version number of the GNU Lesser
|
158
|
-
General Public License, you may choose any version of the GNU Lesser
|
159
|
-
General Public License ever published by the Free Software Foundation.
|
160
|
-
|
161
|
-
If the Library as you received it specifies that a proxy can decide
|
162
|
-
whether future versions of the GNU Lesser General Public License shall
|
163
|
-
apply, that proxy's public statement of acceptance of any version is
|
164
|
-
permanent authorization for you to choose that version for the
|
165
|
-
Library.
|
166
205
|
|
data/{README → README.rdoc}
RENAMED
@@ -1,7 +1,9 @@
|
|
1
1
|
= TracePoint
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
== RESOURCES
|
4
|
+
|
5
|
+
* home: http://rubyworks.github.com/tracepoint
|
6
|
+
* code: http://github.com/rubyworks/tracepoint
|
5
7
|
|
6
8
|
|
7
9
|
== DESCRIPTION
|
@@ -36,11 +38,11 @@ Produces:
|
|
36
38
|
Fixnum + c-call false
|
37
39
|
Fixnum + c-return false
|
38
40
|
|
39
|
-
Tracing can be deactived and
|
41
|
+
Tracing can be deactived and reactivated on the fly by calling #deactivate
|
40
42
|
and #activate.
|
41
43
|
|
42
|
-
To add
|
43
|
-
Trace procedures can also be
|
44
|
+
To add additional trace procedures, simply call the #trace method again.
|
45
|
+
Trace procedures can also be named by providing a name argument to the
|
44
46
|
#trace method. This allows traces to be added and removed without affecting
|
45
47
|
other traces.
|
46
48
|
|
@@ -71,20 +73,20 @@ Follow the usual procedure for installing via RubyGems:
|
|
71
73
|
|
72
74
|
== LICENSE
|
73
75
|
|
74
|
-
(
|
76
|
+
(Apache 2.0 License)
|
75
77
|
|
76
|
-
Copyright (c) 2005,
|
78
|
+
Copyright (c) 2005,2010 Thomas Sawyer
|
77
79
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
80
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
81
|
+
you may not use any of the files packaged with this file
|
82
|
+
except in compliance with this License. You may obtain a copy
|
83
|
+
of the License at
|
82
84
|
|
83
|
-
|
84
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
85
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
86
|
-
GNU General Public License for more details.
|
85
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
87
86
|
|
88
|
-
|
89
|
-
|
87
|
+
Unless required by applicable law or agreed to in writing, software
|
88
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
89
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
90
|
+
See the License for the specific language governing permissions and
|
91
|
+
limitations under the License.
|
90
92
|
|
data/lib/tracepoint.rb
CHANGED
@@ -1,24 +1,3 @@
|
|
1
|
-
# = TracePoint
|
2
|
-
#
|
3
|
-
# Copyright (c) 2005 Thomas Sawyer
|
4
|
-
#
|
5
|
-
# Ruby License
|
6
|
-
#
|
7
|
-
# This module is free software. You may use, modify, and/or redistribute this
|
8
|
-
# software under the same terms as Ruby.
|
9
|
-
#
|
10
|
-
# This program is distributed in the hope that it will be useful, but WITHOUT
|
11
|
-
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
12
|
-
# FOR A PARTICULAR PURPOSE.
|
13
|
-
|
14
|
-
require 'facets/binding'
|
15
|
-
|
16
|
-
# = CodePoint
|
17
|
-
#
|
18
|
-
# This is the same as a Binding. Not really needed, but I like consistency :)
|
19
|
-
|
20
|
-
CodePoint = Binding
|
21
|
-
|
22
1
|
# = TracePoint
|
23
2
|
#
|
24
3
|
# A TracePoint is a Binding with the addition event information.
|
@@ -45,9 +24,14 @@ CodePoint = Binding
|
|
45
24
|
#
|
46
25
|
# == Notes
|
47
26
|
#
|
48
|
-
#
|
27
|
+
# CodePoint alias for Binding has been deprecated.
|
28
|
+
#
|
29
|
+
# We can't subclass Binding, so we delegate.
|
49
30
|
|
50
|
-
class TracePoint
|
31
|
+
class TracePoint #< CodePoint
|
32
|
+
|
33
|
+
# Load library metadata.
|
34
|
+
require 'tracepoint/meta/data'
|
51
35
|
|
52
36
|
# -- class ---------------------
|
53
37
|
|
@@ -120,7 +104,7 @@ class TracePoint #< Codepoint
|
|
120
104
|
@file = file
|
121
105
|
@line = line
|
122
106
|
@method = method
|
123
|
-
@binding = bind
|
107
|
+
@binding = bind || TOPLEVEL_BINDING #?
|
124
108
|
@back_binding = back_binding
|
125
109
|
end
|
126
110
|
|
@@ -137,7 +121,7 @@ class TracePoint #< Codepoint
|
|
137
121
|
# Delegates "self" to the binding which
|
138
122
|
# in turn delegates the binding object.
|
139
123
|
def self
|
140
|
-
@binding.self
|
124
|
+
@binding.self #if @binding
|
141
125
|
end
|
142
126
|
|
143
127
|
# Returns the name of the event's method.
|
@@ -147,9 +131,8 @@ class TracePoint #< Codepoint
|
|
147
131
|
#++
|
148
132
|
def callee ; @method ; end
|
149
133
|
|
150
|
-
#def method ; @method ; end # TODO Conflict with Kernel#method?
|
151
|
-
alias_method( :
|
152
|
-
alias_method( :method_name, :called ) # TODO deprecate
|
134
|
+
#def method ; @method ; end # TODO Conflict with Kernel#method ?
|
135
|
+
alias_method( :method_name, :callee ) # TODO deprecate
|
153
136
|
|
154
137
|
# delegate to binding
|
155
138
|
#def method_missing(meth, *args, &blk)
|
@@ -186,6 +169,25 @@ class TracePoint #< Codepoint
|
|
186
169
|
EVENT_MAP.each_pair do |m,v|
|
187
170
|
define_method( "#{m}?" ){ v.include?(@event) }
|
188
171
|
end
|
172
|
+
end
|
173
|
+
|
174
|
+
|
175
|
+
class Binding #:nodoc:
|
176
|
+
|
177
|
+
unless method_defined?(:eval) # 1.8.7+
|
178
|
+
|
179
|
+
# Evaluate a Ruby source code string (or block) in the binding context.
|
180
|
+
def eval(str)
|
181
|
+
Kernel.eval(str, self)
|
182
|
+
end
|
183
|
+
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns self of the binding context.
|
187
|
+
def self()
|
188
|
+
@_self ||= eval("self")
|
189
|
+
end
|
189
190
|
|
190
191
|
end
|
191
192
|
|
193
|
+
# Copyright (c) 2005,2010 Thomas Sawyer (Apache 2.0 License)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Object.__send__(:remove_const, :VERSION) if defined?(VERSION) # because Ruby 1.8+ gets in the way
|
2
|
+
|
3
|
+
class TracePoint
|
4
|
+
|
5
|
+
#
|
6
|
+
def self.__DIR__
|
7
|
+
File.dirname(__FILE__)
|
8
|
+
end
|
9
|
+
|
10
|
+
#
|
11
|
+
def self.const_missing(name)
|
12
|
+
name = name.to_s.downcase
|
13
|
+
require 'yaml' unless defined?(::YAML)
|
14
|
+
@package ||= YAML.load(File.new(__DIR__ + '/package.yml'))
|
15
|
+
@profile ||= YAML.load(File.new(__DIR__ + '/profile.yml'))
|
16
|
+
@package[name] || @profile[name]
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
title : TracePoint
|
3
|
+
suite : rubyworks
|
4
|
+
summary: "The perfect alternative to #set_trace_func"
|
5
|
+
contact: Thomas Sawyer <transfire@gmail.com>
|
6
|
+
authors: Thomas Sawyer
|
7
|
+
created: 2008-08-08 23:09:48 -0400
|
8
|
+
license: MIT
|
9
|
+
|
10
|
+
copyright: (c) 2005 Thomas Sawyer
|
11
|
+
|
12
|
+
description:
|
13
|
+
A TracePoint is a Binding with the addition of event information.
|
14
|
+
Among other things, it functions very well as the join-point for AOP.
|
15
|
+
In practice it provides a better alternative to using #set_trace_func.
|
16
|
+
|
17
|
+
resources:
|
18
|
+
homepage : http://rubyworks.github.com/tracepoint
|
19
|
+
development : http://github.com/rubyworks/tracepoint
|
20
|
+
repository : git://github.com/rubyworks/tracepoint.git
|
21
|
+
|
data/meta/data.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Object.__send__(:remove_const, :VERSION) if defined?(VERSION) # because Ruby 1.8+ gets in the way
|
2
|
+
|
3
|
+
class TracePoint
|
4
|
+
|
5
|
+
#
|
6
|
+
def self.__DIR__
|
7
|
+
File.dirname(__FILE__)
|
8
|
+
end
|
9
|
+
|
10
|
+
#
|
11
|
+
def self.const_missing(name)
|
12
|
+
name = name.to_s.downcase
|
13
|
+
require 'yaml' unless defined?(::YAML)
|
14
|
+
@package ||= YAML.load(File.new(__DIR__ + '/package.yml'))
|
15
|
+
@profile ||= YAML.load(File.new(__DIR__ + '/profile.yml'))
|
16
|
+
@package[name] || @profile[name]
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
data/meta/package.yml
ADDED
data/meta/profile.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
title : TracePoint
|
3
|
+
suite : rubyworks
|
4
|
+
summary: "The perfect alternative to #set_trace_func"
|
5
|
+
contact: Thomas Sawyer <transfire@gmail.com>
|
6
|
+
authors: Thomas Sawyer
|
7
|
+
created: 2008-08-08 23:09:48 -0400
|
8
|
+
license: MIT
|
9
|
+
|
10
|
+
copyright: (c) 2005 Thomas Sawyer
|
11
|
+
|
12
|
+
description:
|
13
|
+
A TracePoint is a Binding with the addition of event information.
|
14
|
+
Among other things, it functions very well as the join-point for AOP.
|
15
|
+
In practice it provides a better alternative to using #set_trace_func.
|
16
|
+
|
17
|
+
resources:
|
18
|
+
homepage : http://rubyworks.github.com/tracepoint
|
19
|
+
development : http://github.com/rubyworks/tracepoint
|
20
|
+
repository : git://github.com/rubyworks/tracepoint.git
|
21
|
+
|
@@ -1,7 +1,7 @@
|
|
1
1
|
= TracePoint
|
2
2
|
|
3
3
|
To demonstrate TracePoint, we will simply have it feed all
|
4
|
-
|
4
|
+
event parameters into the log for a simple arethmetic call.
|
5
5
|
|
6
6
|
First we need to load the tracepoint.rb library.
|
7
7
|
|
@@ -15,7 +15,7 @@ Now we can setup the trace procedure.
|
|
15
15
|
trace_log << [tp.self.class, tp.callee, tp.event, tp.return?, tp.back == tp.bind]
|
16
16
|
end
|
17
17
|
|
18
|
-
And then we can activate the trace, call
|
18
|
+
And then we can activate the trace, call our arethmetic function,
|
19
19
|
and deactivate the trace.
|
20
20
|
|
21
21
|
TracePoint.activate
|
metadata
CHANGED
@@ -1,84 +1,80 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tracepoint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 31
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 1.2.0
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
|
-
- Thomas Sawyer
|
13
|
+
- Thomas Sawyer
|
8
14
|
autorequire:
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2010-08-05 00:00:00 -04:00
|
13
19
|
default_executable:
|
14
20
|
dependencies: []
|
15
21
|
|
16
|
-
description:
|
17
|
-
|
18
|
-
Among other things, it functions very well as the join-point for AOP.
|
19
|
-
In practice it provides a better alternative to using #set_trace_func.
|
20
|
-
email:
|
22
|
+
description: A TracePoint is a Binding with the addition of event information. Among other things, it functions very well as the join-point for AOP. In practice it provides a better alternative to using
|
23
|
+
email: transfire@gmail.com
|
21
24
|
executables: []
|
22
25
|
|
23
26
|
extensions: []
|
24
27
|
|
25
28
|
extra_rdoc_files:
|
26
|
-
- README
|
27
|
-
- MANIFEST
|
28
|
-
- LICENSE
|
29
|
-
- HISTORY
|
30
|
-
- Syckfile
|
29
|
+
- README.rdoc
|
31
30
|
files:
|
31
|
+
- lib/tracepoint/meta/data.rb
|
32
|
+
- lib/tracepoint/meta/package.yml
|
33
|
+
- lib/tracepoint/meta/profile.yml
|
32
34
|
- lib/tracepoint.rb
|
33
|
-
- meta/
|
34
|
-
- meta/
|
35
|
-
- meta/
|
36
|
-
-
|
37
|
-
-
|
38
|
-
- meta/homepage
|
39
|
-
- meta/license
|
40
|
-
- meta/name
|
41
|
-
- meta/released
|
42
|
-
- meta/repository
|
43
|
-
- meta/summary
|
44
|
-
- meta/title
|
45
|
-
- meta/version
|
46
|
-
- test/demo/trace.qed
|
35
|
+
- meta/data.rb
|
36
|
+
- meta/package.yml
|
37
|
+
- meta/profile.yml
|
38
|
+
- test/demos/trace.qed
|
39
|
+
- HISTORY.rdoc
|
47
40
|
- LICENSE
|
48
|
-
- README
|
49
|
-
- HISTORY
|
50
|
-
- Syckfile
|
51
|
-
- MANIFEST
|
41
|
+
- README.rdoc
|
52
42
|
has_rdoc: true
|
53
43
|
homepage: http://rubyworks.github.com/tracepoint
|
54
|
-
licenses:
|
55
|
-
|
44
|
+
licenses:
|
45
|
+
- MIT
|
56
46
|
post_install_message:
|
57
47
|
rdoc_options:
|
58
48
|
- --title
|
59
49
|
- TracePoint API
|
60
50
|
- --main
|
61
|
-
- README
|
51
|
+
- README.rdoc
|
62
52
|
require_paths:
|
63
53
|
- lib
|
64
54
|
required_ruby_version: !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
65
56
|
requirements:
|
66
57
|
- - ">="
|
67
58
|
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
68
62
|
version: "0"
|
69
|
-
version:
|
70
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
71
65
|
requirements:
|
72
66
|
- - ">="
|
73
67
|
- !ruby/object:Gem::Version
|
68
|
+
hash: 3
|
69
|
+
segments:
|
70
|
+
- 0
|
74
71
|
version: "0"
|
75
|
-
version:
|
76
72
|
requirements: []
|
77
73
|
|
78
74
|
rubyforge_project: tracepoint
|
79
|
-
rubygems_version: 1.3.
|
75
|
+
rubygems_version: 1.3.7
|
80
76
|
signing_key:
|
81
77
|
specification_version: 3
|
82
|
-
summary: "
|
78
|
+
summary: "The perfect alternative to #set_trace_func"
|
83
79
|
test_files: []
|
84
80
|
|
data/MANIFEST
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
#!mast lib meta test [A-Z]*
|
2
|
-
lib/tracepoint.rb
|
3
|
-
meta/authors
|
4
|
-
meta/collection
|
5
|
-
meta/copyright
|
6
|
-
meta/created
|
7
|
-
meta/description
|
8
|
-
meta/homepage
|
9
|
-
meta/license
|
10
|
-
meta/name
|
11
|
-
meta/released
|
12
|
-
meta/repository
|
13
|
-
meta/summary
|
14
|
-
meta/title
|
15
|
-
meta/version
|
16
|
-
test/demo/trace.qed
|
17
|
-
LICENSE
|
18
|
-
README
|
19
|
-
HISTORY
|
20
|
-
Syckfile
|
data/Syckfile
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
---
|
2
|
-
box:
|
3
|
-
service: Box
|
4
|
-
types : [gem, gz]
|
5
|
-
include: [bin, demo, lib, meta, test, "[A-Z]*"]
|
6
|
-
exclude: ~
|
7
|
-
master : false
|
8
|
-
active : true
|
9
|
-
|
10
|
-
dnote:
|
11
|
-
service : DNote
|
12
|
-
loadpath : ~
|
13
|
-
labels : ~
|
14
|
-
output : ~
|
15
|
-
format : ~
|
16
|
-
active : true
|
17
|
-
|
18
|
-
stats:
|
19
|
-
service : Stats
|
20
|
-
title : ~
|
21
|
-
loadpath : ~
|
22
|
-
exclude : ~
|
23
|
-
output : ~
|
24
|
-
active : true
|
25
|
-
|
26
|
-
rdoc:
|
27
|
-
service : RDoc
|
28
|
-
template : redfish
|
29
|
-
include : ~
|
30
|
-
exclude : ~
|
31
|
-
main : ~
|
32
|
-
extra : ~
|
33
|
-
active : true
|
34
|
-
|
35
|
-
ridoc:
|
36
|
-
service: RIDoc
|
37
|
-
include: ~
|
38
|
-
exclude: ~
|
39
|
-
active : true
|
40
|
-
|
41
|
-
vclog:
|
42
|
-
service : VClog
|
43
|
-
# format : html # xml, txt
|
44
|
-
layout : rel # gnu
|
45
|
-
typed : true
|
46
|
-
output : ~
|
47
|
-
active : false
|
48
|
-
|
49
|
-
email:
|
50
|
-
service : Email
|
51
|
-
file : ~
|
52
|
-
subject : ~
|
53
|
-
mailto : ruby-talk@ruby-lang.org
|
54
|
-
from : <%= ENV['EMAIL_ACCOUNT'] %>
|
55
|
-
server : <%= ENV['EMAIL_SERVER'] %>
|
56
|
-
port : <%= ENV['EMAIL_PORT'] %>
|
57
|
-
account : <%= ENV['EMAIL_ACCOUNT'] %>
|
58
|
-
domain : <%= ENV['EMAIL_DOMAIN'] %>
|
59
|
-
login : <%= ENV['EMAIL_LOGIN'] %>
|
60
|
-
secure : <%= ENV['EMAIL_SECURE'] %>
|
61
|
-
active : true
|
62
|
-
|
63
|
-
|
64
|
-
#testrb:
|
65
|
-
# service : Testrb
|
66
|
-
# tests : ~
|
67
|
-
# exclude : ~
|
68
|
-
# loadpath : ~
|
69
|
-
# requires : ~
|
70
|
-
# live : false
|
71
|
-
# active : false
|
72
|
-
|
73
|
-
#rubyforge:
|
74
|
-
# service : Rubyforge
|
75
|
-
# unixname: <%= suite %>
|
76
|
-
# groupid : ~
|
77
|
-
# package : <%= name %>
|
78
|
-
# sitemap:
|
79
|
-
# doc/rdoc: <%= name %>
|
80
|
-
# active : false
|
81
|
-
|
data/meta/authors
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Thomas Sawyer <transfire@gmail.com>
|
data/meta/collection
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rubyworks
|
data/meta/copyright
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
(c) 2005 Thomas Sawyer
|
data/meta/created
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2008-08-08 23:09:48 -0400
|
data/meta/description
DELETED
data/meta/homepage
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
http://rubyworks.github.com/tracepoint
|
data/meta/license
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
LGPL v3
|
data/meta/name
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
tracepoint
|
data/meta/released
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2009-07-11
|
data/meta/repository
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
git://github.com/rubyworks/tracepoint.git
|
data/meta/summary
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
An alternate to #set_trace_func.
|
data/meta/title
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
TracePoint
|
data/meta/version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.1
|