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