author | Claus Gittinger <cg@exept.de> |
Wed, 04 Sep 2013 19:32:01 +0200 | |
changeset 3317 | 55c8ae8f88e6 |
parent 2975 | 648a219eeacd |
child 3557 | 3ccdd414b29f |
permissions | -rw-r--r-- |
2630 | 1 |
" |
2 |
COPYRIGHT (c) 2010 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
"{ Package: 'stx:libcomp' }" |
|
13 |
||
14 |
Object subclass:#InstrumentationInfo |
|
15 |
instanceVariableNames:'owningMethod' |
|
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'System-Compiler-Instrumentation' |
|
19 |
! |
|
20 |
||
21 |
!InstrumentationInfo class methodsFor:'documentation'! |
|
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 2010 by eXept Software AG |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
37 |
documentation |
|
38 |
" |
|
2726 | 39 |
(sub)instances of me are placed by the instrumenting compiler into the literal |
40 |
array of instrumented methods. |
|
41 |
The InstrumentingCompiler generates code to update these, as code is executed. |
|
2630 | 42 |
" |
43 |
! ! |
|
44 |
||
45 |
!InstrumentationInfo class methodsFor:'cleanup'! |
|
46 |
||
47 |
allInfosDo:aBlock |
|
48 |
InstrumentedMethod allInstancesDo:[:m | |
|
2943 | 49 |
self allInfosOfMethod:m do:aBlock |
50 |
]. |
|
51 |
||
52 |
"Created: / 27-04-2010 / 12:09:03 / cg" |
|
53 |
! |
|
54 |
||
55 |
allInfosOfClass:aClass do:aBlock |
|
56 |
aClass instAndClassMethodsDo:[:m | |
|
57 |
m isInstrumented ifTrue:[ |
|
58 |
self allInfosOfMethod:m do:aBlock |
|
59 |
]. |
|
60 |
]. |
|
61 |
||
62 |
"Created: / 27-04-2010 / 12:09:03 / cg" |
|
63 |
! |
|
64 |
||
65 |
allInfosOfMethod:aMethod do:aBlock |
|
66 |
aMethod literalsDo:[:l | |
|
67 |
(l isKindOf:self) ifTrue:[ |
|
68 |
aBlock value:l. |
|
2630 | 69 |
] |
70 |
]. |
|
71 |
||
72 |
"Created: / 27-04-2010 / 12:09:03 / cg" |
|
73 |
! |
|
74 |
||
75 |
cleanAllInfoWithChange:withChange |
|
2943 | 76 |
self allInfosDo:[:info | |
77 |
info cleanInfoWithChange:withChange. |
|
2630 | 78 |
]. |
79 |
||
80 |
" |
|
81 |
InstrumentingCompiler::InstrumentationInfo cleanAllInfo |
|
82 |
InstrumentingCompiler::MethodInvocationInfo cleanAllInfo |
|
83 |
" |
|
84 |
||
85 |
"Modified: / 27-04-2010 / 12:10:07 / cg" |
|
86 |
"Created: / 20-07-2011 / 19:00:37 / cg" |
|
87 |
! ! |
|
88 |
||
89 |
!InstrumentationInfo methodsFor:'accessing'! |
|
90 |
||
2974 | 91 |
currentInstrumentationContext |
92 |
||
93 |
"Created: / 08-08-2011 / 14:41:58 / cg" |
|
94 |
! |
|
95 |
||
2630 | 96 |
owningMethod:something |
97 |
owningMethod := something. |
|
98 |
! ! |
|
99 |
||
100 |
!InstrumentationInfo methodsFor:'instrumentation probe calls'! |
|
101 |
||
2974 | 102 |
entry:callingContext |
103 |
"called on entry from instrumented code" |
|
104 |
||
105 |
"Created: / 27-04-2010 / 12:06:48 / cg" |
|
106 |
! ! |
|
107 |
||
108 |
!InstrumentationInfo methodsFor:'private'! |
|
109 |
||
2966
af0327e1a411
tuning by changing the class to speedup entry into already
Claus Gittinger <cg@exept.de>
parents:
2943
diff
changeset
|
110 |
changeClassToAlreadyEntered |
af0327e1a411
tuning by changing the class to speedup entry into already
Claus Gittinger <cg@exept.de>
parents:
2943
diff
changeset
|
111 |
"nothing done here" |
af0327e1a411
tuning by changing the class to speedup entry into already
Claus Gittinger <cg@exept.de>
parents:
2943
diff
changeset
|
112 |
! |
af0327e1a411
tuning by changing the class to speedup entry into already
Claus Gittinger <cg@exept.de>
parents:
2943
diff
changeset
|
113 |
|
af0327e1a411
tuning by changing the class to speedup entry into already
Claus Gittinger <cg@exept.de>
parents:
2943
diff
changeset
|
114 |
changeClassToCoverageAndAlreadyEntered |
af0327e1a411
tuning by changing the class to speedup entry into already
Claus Gittinger <cg@exept.de>
parents:
2943
diff
changeset
|
115 |
"nothing done here" |
2630 | 116 |
! ! |
117 |
||
118 |
!InstrumentationInfo methodsFor:'testing'! |
|
119 |
||
120 |
isBlockExecutionInfo |
|
121 |
^ false |
|
122 |
||
123 |
"Created: / 07-08-2011 / 17:06:54 / cg" |
|
124 |
! |
|
125 |
||
126 |
isMethodInvocationInfo |
|
127 |
^ false |
|
128 |
||
129 |
"Created: / 08-08-2011 / 14:40:31 / cg" |
|
130 |
! |
|
131 |
||
132 |
isSpecialInstrumentationInfoLiteral |
|
133 |
"return true, if the receiver is a special instrumentation info |
|
134 |
object as placed into the literal array of instrumented methods" |
|
135 |
||
136 |
^ true |
|
137 |
||
138 |
"Created: / 07-08-2011 / 17:04:27 / cg" |
|
139 |
! |
|
140 |
||
141 |
isStatementExecutionInfo |
|
142 |
^ false |
|
143 |
||
144 |
"Created: / 08-08-2011 / 14:40:43 / cg" |
|
2975 | 145 |
! |
146 |
||
147 |
isVariableAccessExecutionInfo |
|
148 |
^ false |
|
2630 | 149 |
! ! |
150 |
||
151 |
!InstrumentationInfo class methodsFor:'documentation'! |
|
152 |
||
153 |
version |
|
2975 | 154 |
^ '$Header: /cvs/stx/stx/libcomp/InstrumentationInfo.st,v 1.6 2012-11-07 22:24:43 cg Exp $' |
2630 | 155 |
! |
156 |
||
157 |
version_CVS |
|
2975 | 158 |
^ '$Header: /cvs/stx/stx/libcomp/InstrumentationInfo.st,v 1.6 2012-11-07 22:24:43 cg Exp $' |
2630 | 159 |
! ! |