@@ -93,8 +93,8 @@ enum XRayPatchingStatus {
93
93
FAILED = 3 ,
94
94
};
95
95
96
- // / This tells XRay to patch the instrumentation points in all currently loaded objects. See XRayPatchingStatus
97
- // / for possible result values.
96
+ // / This tells XRay to patch the instrumentation points in all currently loaded
97
+ // / objects. See XRayPatchingStatus for possible result values.
98
98
extern XRayPatchingStatus __xray_patch ();
99
99
100
100
// / This tells XRay to patch the instrumentation points in the given object.
@@ -105,17 +105,17 @@ extern XRayPatchingStatus __xray_patch_object(int32_t ObjId);
105
105
// / result values.
106
106
extern XRayPatchingStatus __xray_unpatch ();
107
107
108
- // / Reverses the effect of __xray_patch_object. See XRayPatchingStatus for possible
109
- // / result values.
108
+ // / Reverses the effect of __xray_patch_object. See XRayPatchingStatus for
109
+ // / possible result values.
110
110
extern XRayPatchingStatus __xray_unpatch_object (int32_t ObjId);
111
111
112
112
// / This unpacks the given (packed) function id and patches
113
113
// / the corresponding function. See XRayPatchingStatus for possible
114
114
// / result values.
115
115
extern XRayPatchingStatus __xray_patch_function (int32_t FuncId);
116
116
117
- // / This patches a specific function in the given object. See XRayPatchingStatus for possible
118
- // / result values.
117
+ // / This patches a specific function in the given object. See XRayPatchingStatus
118
+ // / for possible result values.
119
119
extern XRayPatchingStatus __xray_patch_function_in_object (int32_t FuncId,
120
120
int32_t ObjId);
121
121
@@ -129,26 +129,29 @@ extern XRayPatchingStatus __xray_unpatch_function(int32_t FuncId);
129
129
extern XRayPatchingStatus __xray_unpatch_function_in_object (int32_t FuncId,
130
130
int32_t ObjId);
131
131
132
- // / This function unpacks the given (packed) function id and returns the address of the corresponding function. We return 0 if we encounter any error, even if 0 may be a valid function
133
- // / address.
132
+ // / This function unpacks the given (packed) function id and returns the address
133
+ // / of the corresponding function. We return 0 if we encounter any error, even
134
+ // / if 0 may be a valid function address.
134
135
extern uintptr_t __xray_function_address (int32_t FuncId);
135
136
136
- // / This function returns the address of the function in the given object provided valid function and object
137
- // / ids. We return 0 if we encounter any error, even if 0 may be a valid function
138
- // / address.
137
+ // / This function returns the address of the function in the given object
138
+ // / provided valid function and object ids. We return 0 if we encounter any
139
+ // / error, even if 0 may be a valid function address.
139
140
extern uintptr_t __xray_function_address_in_object (int32_t FuncId,
140
141
int32_t ObjId);
141
142
142
- // / This function returns the maximum valid function id for the main executable (object id = 0). Returns 0 if we
143
- // / encounter errors (when there are no instrumented functions, etc.).
143
+ // / This function returns the maximum valid function id for the main executable
144
+ // / (object id = 0). Returns 0 if we encounter errors (when there are no
145
+ // / instrumented functions, etc.).
144
146
extern size_t __xray_max_function_id ();
145
147
146
- // / This function returns the maximum valid function id for the given object. Returns 0 if we
147
- // / encounter errors (when there are no instrumented functions, etc.).
148
+ // / This function returns the maximum valid function id for the given object.
149
+ // / Returns 0 if we encounter errors (when there are no instrumented functions,
150
+ // / etc.).
148
151
extern size_t __xray_max_function_id_in_object (int32_t ObjId);
149
152
150
- // / This function returns the number of previously registered objects (executable + loaded DSOs).
151
- // / Returns 0 if XRay has not been initialized.
153
+ // / This function returns the number of previously registered objects
154
+ // / (executable + loaded DSOs). Returns 0 if XRay has not been initialized.
152
155
extern size_t __xray_num_objects ();
153
156
154
157
// / Unpacks the function id from the given packed id.
@@ -158,7 +161,8 @@ extern int32_t __xray_unpack_function_id(int32_t PackedId);
158
161
extern int32_t __xray_unpack_object_id (int32_t PackedId);
159
162
160
163
// / Creates and returns a packed id from the given function and object ids.
161
- // / If the ids do not fit within the reserved number of bits for each part, the high bits are truncated.
164
+ // / If the ids do not fit within the reserved number of bits for each part, the
165
+ // / high bits are truncated.
162
166
extern int32_t __xray_pack_id (int32_t FuncId, int32_t ObjId);
163
167
164
168
// / Initialize the required XRay data structures. This is useful in cases where
0 commit comments