@@ -130,7 +130,7 @@ static std::uint16_t RuntimeFunctionCountersOffsets[] = {
130
130
// / Public APIs
131
131
132
132
// / Get the runtime object state associated with an object.
133
- void _swift_getObjectRuntimeFunctionCounters (
133
+ SWIFT_CC (swift) void _swift_getObjectRuntimeFunctionCounters(
134
134
HeapObject *object, RuntimeFunctionCountersState *result) {
135
135
auto &theSentinel = RuntimeObjectStateCache.get ();
136
136
Mutex::ScopedLock lock (theSentinel.Lock );
@@ -139,7 +139,7 @@ void _swift_getObjectRuntimeFunctionCounters(
139
139
140
140
// / Set the runtime object state associated with an object from a provided
141
141
// / state.
142
- void _swift_setObjectRuntimeFunctionCounters (
142
+ SWIFT_CC (swift) void _swift_setObjectRuntimeFunctionCounters(
143
143
HeapObject *object, RuntimeFunctionCountersState *state) {
144
144
auto &theSentinel = RuntimeObjectStateCache.get ();
145
145
Mutex::ScopedLock lock (theSentinel.Lock );
@@ -148,14 +148,14 @@ void _swift_setObjectRuntimeFunctionCounters(
148
148
149
149
// / Get the global runtime state containing the total numbers of invocations for
150
150
// / each runtime function of interest.
151
- void _swift_getGlobalRuntimeFunctionCounters (
151
+ SWIFT_CC (swift) void _swift_getGlobalRuntimeFunctionCounters(
152
152
RuntimeFunctionCountersState *result) {
153
153
LazyMutex::ScopedLock lock (RuntimeGlobalFunctionCountersState.Lock );
154
154
*result = RuntimeGlobalFunctionCountersState.State ;
155
155
}
156
156
157
157
// / Set the global runtime state of function pointers from a provided state.
158
- void _swift_setGlobalRuntimeFunctionCounters (
158
+ SWIFT_CC (swift) void _swift_setGlobalRuntimeFunctionCounters(
159
159
RuntimeFunctionCountersState *state) {
160
160
LazyMutex::ScopedLock lock (RuntimeGlobalFunctionCountersState.Lock );
161
161
RuntimeGlobalFunctionCountersState.State = *state;
@@ -164,18 +164,20 @@ void _swift_setGlobalRuntimeFunctionCounters(
164
164
// / Return the names of the runtime functions being tracked.
165
165
// / Their order is the same as the order of the counters in the
166
166
// / RuntimeObjectState structure. All these strings are null terminated.
167
- const char **_swift_getRuntimeFunctionNames () {
167
+ SWIFT_CC (swift) const char **_swift_getRuntimeFunctionNames() {
168
168
return RuntimeFunctionNames;
169
169
}
170
170
171
171
// / Return the offsets of the runtime function counters being tracked.
172
172
// / Their order is the same as the order of the counters in the
173
173
// / RuntimeObjectState structure.
174
+ SWIFT_CC (swift)
174
175
const std::uint16_t *_swift_getRuntimeFunctionCountersOffsets() {
175
176
return RuntimeFunctionCountersOffsets;
176
177
}
177
178
178
179
// / Return the number of runtime functions being tracked.
180
+ SWIFT_CC (swift)
179
181
std::uint64_t _swift_getNumRuntimeFunctionCounters() {
180
182
return ID_LastRuntimeFunctionName;
181
183
}
@@ -204,15 +206,15 @@ void _swift_dumpObjectsRuntimeFunctionPointers() {
204
206
205
207
// / Set mode for global runtime function counters.
206
208
// / Return the old value of this flag.
207
- int _swift_setGlobalRuntimeFunctionCountersMode (int mode) {
209
+ SWIFT_CC (swift) int _swift_setGlobalRuntimeFunctionCountersMode(int mode) {
208
210
int oldMode = UpdateGlobalRuntimeFunctionCounters;
209
211
UpdateGlobalRuntimeFunctionCounters = mode ? 1 : 0 ;
210
212
return oldMode;
211
213
}
212
214
213
215
// / Set mode for per object runtime function counters.
214
216
// / Return the old value of this flag.
215
- int _swift_setPerObjectRuntimeFunctionCountersMode (int mode) {
217
+ SWIFT_CC (swift) int _swift_setPerObjectRuntimeFunctionCountersMode(int mode) {
216
218
int oldMode = UpdatePerObjectRuntimeFunctionCounters;
217
219
UpdatePerObjectRuntimeFunctionCounters = mode ? 1 : 0 ;
218
220
return oldMode;
0 commit comments