@@ -130,7 +130,7 @@ static std::uint16_t RuntimeFunctionCountersOffsets[] = {
130130// / Public APIs
131131
132132// / Get the runtime object state associated with an object.
133- void _swift_getObjectRuntimeFunctionCounters (
133+ SWIFT_CC (swift) void _swift_getObjectRuntimeFunctionCounters(
134134 HeapObject *object, RuntimeFunctionCountersState *result) {
135135 auto &theSentinel = RuntimeObjectStateCache.get ();
136136 Mutex::ScopedLock lock (theSentinel.Lock );
@@ -139,7 +139,7 @@ void _swift_getObjectRuntimeFunctionCounters(
139139
140140// / Set the runtime object state associated with an object from a provided
141141// / state.
142- void _swift_setObjectRuntimeFunctionCounters (
142+ SWIFT_CC (swift) void _swift_setObjectRuntimeFunctionCounters(
143143 HeapObject *object, RuntimeFunctionCountersState *state) {
144144 auto &theSentinel = RuntimeObjectStateCache.get ();
145145 Mutex::ScopedLock lock (theSentinel.Lock );
@@ -148,14 +148,14 @@ void _swift_setObjectRuntimeFunctionCounters(
148148
149149// / Get the global runtime state containing the total numbers of invocations for
150150// / each runtime function of interest.
151- void _swift_getGlobalRuntimeFunctionCounters (
151+ SWIFT_CC (swift) void _swift_getGlobalRuntimeFunctionCounters(
152152 RuntimeFunctionCountersState *result) {
153153 LazyMutex::ScopedLock lock (RuntimeGlobalFunctionCountersState.Lock );
154154 *result = RuntimeGlobalFunctionCountersState.State ;
155155}
156156
157157// / Set the global runtime state of function pointers from a provided state.
158- void _swift_setGlobalRuntimeFunctionCounters (
158+ SWIFT_CC (swift) void _swift_setGlobalRuntimeFunctionCounters(
159159 RuntimeFunctionCountersState *state) {
160160 LazyMutex::ScopedLock lock (RuntimeGlobalFunctionCountersState.Lock );
161161 RuntimeGlobalFunctionCountersState.State = *state;
@@ -164,18 +164,20 @@ void _swift_setGlobalRuntimeFunctionCounters(
164164// / Return the names of the runtime functions being tracked.
165165// / Their order is the same as the order of the counters in the
166166// / RuntimeObjectState structure. All these strings are null terminated.
167- const char **_swift_getRuntimeFunctionNames () {
167+ SWIFT_CC (swift) const char **_swift_getRuntimeFunctionNames() {
168168 return RuntimeFunctionNames;
169169}
170170
171171// / Return the offsets of the runtime function counters being tracked.
172172// / Their order is the same as the order of the counters in the
173173// / RuntimeObjectState structure.
174+ SWIFT_CC (swift)
174175const std::uint16_t *_swift_getRuntimeFunctionCountersOffsets() {
175176 return RuntimeFunctionCountersOffsets;
176177}
177178
178179// / Return the number of runtime functions being tracked.
180+ SWIFT_CC (swift)
179181std::uint64_t _swift_getNumRuntimeFunctionCounters() {
180182 return ID_LastRuntimeFunctionName;
181183}
@@ -204,15 +206,15 @@ void _swift_dumpObjectsRuntimeFunctionPointers() {
204206
205207// / Set mode for global runtime function counters.
206208// / Return the old value of this flag.
207- int _swift_setGlobalRuntimeFunctionCountersMode (int mode) {
209+ SWIFT_CC (swift) int _swift_setGlobalRuntimeFunctionCountersMode(int mode) {
208210 int oldMode = UpdateGlobalRuntimeFunctionCounters;
209211 UpdateGlobalRuntimeFunctionCounters = mode ? 1 : 0 ;
210212 return oldMode;
211213}
212214
213215// / Set mode for per object runtime function counters.
214216// / Return the old value of this flag.
215- int _swift_setPerObjectRuntimeFunctionCountersMode (int mode) {
217+ SWIFT_CC (swift) int _swift_setPerObjectRuntimeFunctionCountersMode(int mode) {
216218 int oldMode = UpdatePerObjectRuntimeFunctionCounters;
217219 UpdatePerObjectRuntimeFunctionCounters = mode ? 1 : 0 ;
218220 return oldMode;
0 commit comments