@@ -16,58 +16,94 @@ struct InstrumentHooks {
1616
1717static struct InstrumentHooks stub_instance = {0};
1818
19- InstrumentHooks * instrument_hooks_init(void) { return &stub_instance; }
19+ InstrumentHooks* instrument_hooks_init(void) { return &stub_instance; }
2020
21- void instrument_hooks_deinit(InstrumentHooks * hooks) {}
21+ void instrument_hooks_deinit(InstrumentHooks* hooks) { (void)hooks; }
2222
23- bool instrument_hooks_is_instrumented(InstrumentHooks *hooks) { return false; }
23+ bool instrument_hooks_is_instrumented(InstrumentHooks* hooks) {
24+ (void)hooks;
25+ return false;
26+ }
2427
25- uint8_t instrument_hooks_start_benchmark(InstrumentHooks *hooks) { return 0; }
28+ uint8_t instrument_hooks_start_benchmark(InstrumentHooks* hooks) {
29+ (void)hooks;
30+ return 0;
31+ }
2632
27- uint8_t instrument_hooks_stop_benchmark(InstrumentHooks *hooks) { return 0; }
33+ uint8_t instrument_hooks_stop_benchmark(InstrumentHooks* hooks) {
34+ (void)hooks;
35+ return 0;
36+ }
2837
29- uint8_t instrument_hooks_set_executed_benchmark(InstrumentHooks *hooks,
30- uint32_t pid, const char *uri) {
38+ uint8_t instrument_hooks_set_executed_benchmark(InstrumentHooks* hooks,
39+ uint32_t pid, const char* uri) {
40+ (void)hooks;
41+ (void)pid;
42+ (void)uri;
3143 return 0;
3244}
3345
3446// Deprecated: use instrument_hooks_set_executed_benchmark instead
35- uint8_t instrument_hooks_executed_benchmark(InstrumentHooks *hooks,
36- uint32_t pid, const char *uri) {
47+ uint8_t instrument_hooks_executed_benchmark(InstrumentHooks* hooks,
48+ uint32_t pid, const char* uri) {
49+ (void)hooks;
50+ (void)pid;
51+ (void)uri;
3752 return 0;
3853}
3954
40- uint8_t instrument_hooks_set_integration(InstrumentHooks *hooks,
41- const char *name,
42- const char *version) {
55+ uint8_t instrument_hooks_set_integration(InstrumentHooks* hooks,
56+ const char* name,
57+ const char* version) {
58+ (void)hooks;
59+ (void)name;
60+ (void)version;
4361 return 0;
4462}
4563
46- void instrument_hooks_set_feature(uint64_t feature, bool enabled) {}
64+ void instrument_hooks_set_feature(uint64_t feature, bool enabled) {
65+ (void)feature;
66+ (void)enabled;
67+ }
4768
4869uint64_t instrument_hooks_current_timestamp(void) { return 0; }
4970
50- uint8_t instrument_hooks_add_marker(InstrumentHooks * hooks, uint32_t pid,
71+ uint8_t instrument_hooks_add_marker(InstrumentHooks* hooks, uint32_t pid,
5172 uint8_t marker_type, uint64_t timestamp) {
73+ (void)hooks;
74+ (void)pid;
75+ (void)marker_type;
76+ (void)timestamp;
5277 return 0;
5378}
5479
55- uint8_t instrument_hooks_set_environment(InstrumentHooks *hooks,
56- const char *section_name,
57- const char *key, const char *value) {
80+ uint8_t instrument_hooks_set_environment(InstrumentHooks* hooks,
81+ const char* section_name,
82+ const char* key, const char* value) {
83+ (void)hooks;
84+ (void)section_name;
85+ (void)key;
86+ (void)value;
5887 return 0;
5988}
6089
61- uint8_t instrument_hooks_set_environment_list(InstrumentHooks * hooks,
62- const char * section_name,
63- const char * key,
64- const char *const * values,
90+ uint8_t instrument_hooks_set_environment_list(InstrumentHooks* hooks,
91+ const char* section_name,
92+ const char* key,
93+ const char* const* values,
6594 uint32_t count) {
95+ (void)hooks;
96+ (void)section_name;
97+ (void)key;
98+ (void)values;
99+ (void)count;
66100 return 0;
67101}
68102
69- uint8_t instrument_hooks_write_environment(InstrumentHooks * hooks,
103+ uint8_t instrument_hooks_write_environment(InstrumentHooks* hooks,
70104 uint32_t pid) {
105+ (void)hooks;
106+ (void)pid;
71107 return 0;
72108}
73109
@@ -30970,7 +31006,20 @@ static struct Target_Cpu_Model__994 const Target_x86_cpu_tigerlake__4631 = {{(ui
3097031006
3097131007#include <stdint.h>
3097231008
30973- #ifndef _WIN32
31009+ #if defined(_WIN32) || defined(__APPLE__)
31010+ // Windows and other platforms - provide no-op implementations
31011+ uint8_t running_on_valgrind() { return 0; }
31012+
31013+ void callgrind_dump_stats() {}
31014+
31015+ void callgrind_dump_stats_at(uint8_t const* pos_str) { (void)pos_str; }
31016+
31017+ void callgrind_zero_stats() {}
31018+
31019+ void callgrind_start_instrumentation() {}
31020+
31021+ void callgrind_stop_instrumentation() {}
31022+ #else
3097431023#include "callgrind.h"
3097531024#include "valgrind.h"
3097631025
@@ -30988,19 +31037,6 @@ void callgrind_start_instrumentation() { CALLGRIND_START_INSTRUMENTATION; }
3098831037
3098931038void callgrind_stop_instrumentation() { CALLGRIND_STOP_INSTRUMENTATION; }
3099031039
30991- #else
30992- // Windows and other platforms - provide no-op implementations
30993- uint8_t running_on_valgrind() { return 0; }
30994-
30995- void callgrind_dump_stats() {}
30996-
30997- void callgrind_dump_stats_at(uint8_t const* pos_str) {}
30998-
30999- void callgrind_zero_stats() {}
31000-
31001- void callgrind_start_instrumentation() {}
31002-
31003- void callgrind_stop_instrumentation() {}
3100431040#endif
3100531041
3100631042#endif
0 commit comments