libdatadog 13.1.0.1.0 → 14.0.0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libdatadog/version.rb +1 -1
- data/vendor/{libdatadog-13.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-14.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/LICENSE-3rdparty.yml +9372 -9889
- data/vendor/{libdatadog-13.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-14.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/blazesym.h +121 -60
- data/vendor/{libdatadog-13.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-14.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/common.h +10 -5
- data/vendor/{libdatadog-13.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-14.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu}/include/datadog/crashtracker.h +7 -25
- data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/profiling.h +3 -3
- data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/include/datadog/telemetry.h +1 -1
- data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-13.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-14.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/LICENSE-3rdparty.yml +9372 -9889
- data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/include/datadog/blazesym.h +121 -60
- data/vendor/{libdatadog-13.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-14.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/common.h +10 -5
- data/vendor/{libdatadog-13.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-14.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/crashtracker.h +7 -25
- data/vendor/{libdatadog-13.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-14.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/profiling.h +3 -3
- data/vendor/{libdatadog-13.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-14.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl}/include/datadog/telemetry.h +1 -1
- data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml +9372 -9889
- data/vendor/{libdatadog-13.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-14.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/blazesym.h +121 -60
- data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h +10 -5
- data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/crashtracker.h +7 -25
- data/vendor/{libdatadog-13.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-14.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/profiling.h +3 -3
- data/vendor/{libdatadog-13.1.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-14.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/include/datadog/telemetry.h +1 -1
- data/vendor/{libdatadog-13.1.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-14.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu}/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-13.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-14.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/LICENSE-3rdparty.yml +9372 -9889
- data/vendor/{libdatadog-13.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-14.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/blazesym.h +121 -60
- data/vendor/{libdatadog-13.1.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-14.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/common.h +10 -5
- data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/include/datadog/crashtracker.h +7 -25
- data/vendor/{libdatadog-13.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-14.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/profiling.h +3 -3
- data/vendor/{libdatadog-13.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-14.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/include/datadog/telemetry.h +1 -1
- data/vendor/{libdatadog-13.1.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-14.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl}/lib/libdatadog_profiling.so +0 -0
- metadata +46 -46
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/NOTICE +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/NOTICE +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/NOTICE +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/LICENSE +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/NOTICE +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/bin/libdatadog-crashtracking-receiver +0 -0
- /data/vendor/{libdatadog-13.1.0 → libdatadog-14.0.0}/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -0
@@ -1,10 +1,10 @@
|
|
1
1
|
// BSD-3-Clause License
|
2
2
|
// Synchronized from blazesym repository
|
3
|
-
// https://github.com/libbpf/blazesym/blob/capi-v0.1.0-rc.
|
3
|
+
// https://github.com/libbpf/blazesym/blob/capi-v0.1.0-rc.1/capi/include/blazesym.h
|
4
4
|
/*
|
5
5
|
* Please refer to the documentation hosted at
|
6
6
|
*
|
7
|
-
* https://docs.rs/blazesym-c/0.1.0-rc.
|
7
|
+
* https://docs.rs/blazesym-c/0.1.0-rc.1
|
8
8
|
*/
|
9
9
|
|
10
10
|
|
@@ -223,7 +223,7 @@ typedef struct blaze_sym_info {
|
|
223
223
|
/**
|
224
224
|
* See [`inspect::SymInfo::addr`].
|
225
225
|
*/
|
226
|
-
|
226
|
+
uint64_t addr;
|
227
227
|
/**
|
228
228
|
* See [`inspect::SymInfo::size`].
|
229
229
|
*/
|
@@ -296,6 +296,27 @@ typedef struct blaze_normalizer_opts {
|
|
296
296
|
* ensure compatibility in the presence of member additions.
|
297
297
|
*/
|
298
298
|
size_t type_size;
|
299
|
+
/**
|
300
|
+
* Whether or not to use the `PROCMAP_QUERY` ioctl instead of
|
301
|
+
* parsing `/proc/<pid>/maps` for getting available VMA ranges.
|
302
|
+
*
|
303
|
+
* Refer to
|
304
|
+
* [`blaze_supports_procmap_query`][crate::helper::blaze_supports_procmap_query]
|
305
|
+
* as a way to check whether your system supports this
|
306
|
+
* functionality.
|
307
|
+
*
|
308
|
+
* # Notes
|
309
|
+
*
|
310
|
+
* Support for this ioctl is only present in very recent kernels
|
311
|
+
* (likely: 6.11+). See <https://lwn.net/Articles/979931/> for
|
312
|
+
* details.
|
313
|
+
*
|
314
|
+
* Furthermore, the ioctl will also be used for retrieving build
|
315
|
+
* IDs (if enabled). Build ID reading logic in the kernel is known
|
316
|
+
* to be incomplete, with a fix slated to be included only with
|
317
|
+
* 6.12.
|
318
|
+
*/
|
319
|
+
bool use_procmap_query;
|
299
320
|
/**
|
300
321
|
* Whether or not to cache `/proc/<pid>/maps` contents.
|
301
322
|
*
|
@@ -304,10 +325,13 @@ typedef struct blaze_normalizer_opts {
|
|
304
325
|
* may not be normalized successfully, as there is no reasonable way of
|
305
326
|
* detecting staleness.
|
306
327
|
*/
|
307
|
-
bool
|
328
|
+
bool cache_vmas;
|
308
329
|
/**
|
309
330
|
* Whether to read and report build IDs as part of the normalization
|
310
331
|
* process.
|
332
|
+
*
|
333
|
+
* Note that build ID read failures will be swallowed without
|
334
|
+
* failing the normalization operation.
|
311
335
|
*/
|
312
336
|
bool build_ids;
|
313
337
|
/**
|
@@ -319,7 +343,7 @@ typedef struct blaze_normalizer_opts {
|
|
319
343
|
* Unused member available for future expansion. Must be initialized
|
320
344
|
* to zero.
|
321
345
|
*/
|
322
|
-
uint8_t reserved[
|
346
|
+
uint8_t reserved[4];
|
323
347
|
} blaze_normalizer_opts;
|
324
348
|
|
325
349
|
/**
|
@@ -350,7 +374,7 @@ typedef struct blaze_user_meta_elf {
|
|
350
374
|
*/
|
351
375
|
size_t build_id_len;
|
352
376
|
/**
|
353
|
-
* The optional build ID of the ELF file, if found.
|
377
|
+
* The optional build ID of the ELF file, if found and readable.
|
354
378
|
*/
|
355
379
|
uint8_t *build_id;
|
356
380
|
/**
|
@@ -627,7 +651,7 @@ typedef struct blaze_sym {
|
|
627
651
|
* the file (and reported by tools such as `readelf(1)`,
|
628
652
|
* `llvm-gsymutil`, or similar).
|
629
653
|
*/
|
630
|
-
|
654
|
+
uint64_t addr;
|
631
655
|
/**
|
632
656
|
* The byte offset of the address that got symbolized from the
|
633
657
|
* start of the symbol (i.e., from `addr`).
|
@@ -664,12 +688,12 @@ typedef struct blaze_sym {
|
|
664
688
|
} blaze_sym;
|
665
689
|
|
666
690
|
/**
|
667
|
-
* `
|
691
|
+
* `blaze_syms` is the result of symbolization of a list of addresses.
|
668
692
|
*
|
669
|
-
* Instances of [`
|
670
|
-
* variants. They should be freed by calling [`
|
693
|
+
* Instances of [`blaze_syms`] are returned by any of the `blaze_symbolize_*`
|
694
|
+
* variants. They should be freed by calling [`blaze_syms_free`].
|
671
695
|
*/
|
672
|
-
typedef struct
|
696
|
+
typedef struct blaze_syms {
|
673
697
|
/**
|
674
698
|
* The number of symbols being reported.
|
675
699
|
*/
|
@@ -681,7 +705,7 @@ typedef struct blaze_result {
|
|
681
705
|
* Therefore, every input address has an associated symbol.
|
682
706
|
*/
|
683
707
|
struct blaze_sym syms[0];
|
684
|
-
}
|
708
|
+
} blaze_syms;
|
685
709
|
|
686
710
|
/**
|
687
711
|
* The parameters to load symbols and debug information from a process.
|
@@ -862,6 +886,43 @@ enum blaze_err blaze_err_last(void);
|
|
862
886
|
*/
|
863
887
|
const char *blaze_err_str(enum blaze_err err);
|
864
888
|
|
889
|
+
/**
|
890
|
+
* Check whether the `PROCMAP_QUERY` ioctl is supported by the system.
|
891
|
+
*
|
892
|
+
* This function returns `true` if the system supports the
|
893
|
+
* `PROCMAP_QUERY` ioctl and `false` in all other cases, including when
|
894
|
+
* an error occurred. Use [`blaze_err_last`] to optionally retrieve
|
895
|
+
* this error.
|
896
|
+
*/
|
897
|
+
bool blaze_supports_procmap_query(void);
|
898
|
+
|
899
|
+
/**
|
900
|
+
* Read the build ID of an ELF file located at the given path.
|
901
|
+
*
|
902
|
+
* Build IDs can have variable length, depending on which flavor is
|
903
|
+
* used (e.g., 20 bytes for `sha1` flavor). Build IDs are
|
904
|
+
* reported as "raw" bytes. If you need a hexadecimal representation as
|
905
|
+
* reported by tools such as `readelf(1)`, a post processing step is
|
906
|
+
* necessary.
|
907
|
+
*
|
908
|
+
* On success and when a build ID present, the function returns a
|
909
|
+
* pointer to the "raw" build ID bytes and `len`, if provided, is set
|
910
|
+
* to the build ID's length. The resulting buffer should be released
|
911
|
+
* using libc's `free` function once it is no longer needed.
|
912
|
+
*
|
913
|
+
* On error, the function returns `NULL` and sets the thread's last
|
914
|
+
* error to indicate the problem encountered. Use [`blaze_err_last`] to
|
915
|
+
* retrieve this error.
|
916
|
+
*
|
917
|
+
* Similarly, if no build ID is present `NULL` is returned and the last
|
918
|
+
* error will be set to [`BLAZE_ERR_OK`][blaze_err::BLAZE_ERR_OK].
|
919
|
+
*
|
920
|
+
* # Safety
|
921
|
+
* - `path` needs to be a valid pointer to a NUL terminated string
|
922
|
+
*/
|
923
|
+
uint8_t *blaze_read_elf_build_id(const char *path,
|
924
|
+
size_t *len);
|
925
|
+
|
865
926
|
/**
|
866
927
|
* Lookup symbol information in an ELF file.
|
867
928
|
*
|
@@ -993,7 +1054,7 @@ const char *blaze_normalize_reason_str(blaze_normalize_reason err);
|
|
993
1054
|
*/
|
994
1055
|
struct blaze_normalized_user_output *blaze_normalize_user_addrs(const blaze_normalizer *normalizer,
|
995
1056
|
uint32_t pid,
|
996
|
-
const
|
1057
|
+
const uint64_t *addrs,
|
997
1058
|
size_t addr_cnt);
|
998
1059
|
|
999
1060
|
/**
|
@@ -1019,7 +1080,7 @@ struct blaze_normalized_user_output *blaze_normalize_user_addrs(const blaze_norm
|
|
1019
1080
|
*/
|
1020
1081
|
struct blaze_normalized_user_output *blaze_normalize_user_addrs_opts(const blaze_normalizer *normalizer,
|
1021
1082
|
uint32_t pid,
|
1022
|
-
const
|
1083
|
+
const uint64_t *addrs,
|
1023
1084
|
size_t addr_cnt,
|
1024
1085
|
const struct blaze_normalize_opts *opts);
|
1025
1086
|
|
@@ -1085,9 +1146,9 @@ void blaze_symbolizer_free(blaze_symbolizer *symbolizer);
|
|
1085
1146
|
/**
|
1086
1147
|
* Symbolize a list of process absolute addresses.
|
1087
1148
|
*
|
1088
|
-
* On success, the function returns a [`
|
1149
|
+
* On success, the function returns a [`blaze_syms`] containing an
|
1089
1150
|
* array of `abs_addr_cnt` [`blaze_sym`] objects. The returned object
|
1090
|
-
* should be released using [`
|
1151
|
+
* should be released using [`blaze_syms_free`] once it is no longer
|
1091
1152
|
* needed.
|
1092
1153
|
*
|
1093
1154
|
* On error, the function returns `NULL` and sets the thread's last error to
|
@@ -1097,19 +1158,19 @@ void blaze_symbolizer_free(blaze_symbolizer *symbolizer);
|
|
1097
1158
|
* # Safety
|
1098
1159
|
* - `symbolizer` needs to point to a valid [`blaze_symbolizer`] object
|
1099
1160
|
* - `src` needs to point to a valid [`blaze_symbolize_src_process`] object
|
1100
|
-
*
|
1161
|
+
* - `abs_addrs` point to an array of `abs_addr_cnt` addresses
|
1101
1162
|
*/
|
1102
|
-
const struct
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1163
|
+
const struct blaze_syms *blaze_symbolize_process_abs_addrs(blaze_symbolizer *symbolizer,
|
1164
|
+
const struct blaze_symbolize_src_process *src,
|
1165
|
+
const uint64_t *abs_addrs,
|
1166
|
+
size_t abs_addr_cnt);
|
1106
1167
|
|
1107
1168
|
/**
|
1108
1169
|
* Symbolize a list of kernel absolute addresses.
|
1109
1170
|
*
|
1110
|
-
* On success, the function returns a [`
|
1171
|
+
* On success, the function returns a [`blaze_syms`] containing an
|
1111
1172
|
* array of `abs_addr_cnt` [`blaze_sym`] objects. The returned object
|
1112
|
-
* should be released using [`
|
1173
|
+
* should be released using [`blaze_syms_free`] once it is no longer
|
1113
1174
|
* needed.
|
1114
1175
|
*
|
1115
1176
|
* On error, the function returns `NULL` and sets the thread's last error to
|
@@ -1119,19 +1180,19 @@ const struct blaze_result *blaze_symbolize_process_abs_addrs(blaze_symbolizer *s
|
|
1119
1180
|
* # Safety
|
1120
1181
|
* - `symbolizer` needs to point to a valid [`blaze_symbolizer`] object
|
1121
1182
|
* - `src` needs to point to a valid [`blaze_symbolize_src_kernel`] object
|
1122
|
-
*
|
1183
|
+
* - `abs_addrs` point to an array of `abs_addr_cnt` addresses
|
1123
1184
|
*/
|
1124
|
-
const struct
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1185
|
+
const struct blaze_syms *blaze_symbolize_kernel_abs_addrs(blaze_symbolizer *symbolizer,
|
1186
|
+
const struct blaze_symbolize_src_kernel *src,
|
1187
|
+
const uint64_t *abs_addrs,
|
1188
|
+
size_t abs_addr_cnt);
|
1128
1189
|
|
1129
1190
|
/**
|
1130
1191
|
* Symbolize virtual offsets in an ELF file.
|
1131
1192
|
*
|
1132
|
-
* On success, the function returns a [`
|
1193
|
+
* On success, the function returns a [`blaze_syms`] containing an
|
1133
1194
|
* array of `virt_offset_cnt` [`blaze_sym`] objects. The returned
|
1134
|
-
* object should be released using [`
|
1195
|
+
* object should be released using [`blaze_syms_free`] once it is no
|
1135
1196
|
* longer needed.
|
1136
1197
|
*
|
1137
1198
|
* On error, the function returns `NULL` and sets the thread's last error to
|
@@ -1141,19 +1202,19 @@ const struct blaze_result *blaze_symbolize_kernel_abs_addrs(blaze_symbolizer *sy
|
|
1141
1202
|
* # Safety
|
1142
1203
|
* - `symbolizer` needs to point to a valid [`blaze_symbolizer`] object
|
1143
1204
|
* - `src` needs to point to a valid [`blaze_symbolize_src_elf`] object
|
1144
|
-
*
|
1205
|
+
* - `virt_offsets` point to an array of `virt_offset_cnt` addresses
|
1145
1206
|
*/
|
1146
|
-
const struct
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1207
|
+
const struct blaze_syms *blaze_symbolize_elf_virt_offsets(blaze_symbolizer *symbolizer,
|
1208
|
+
const struct blaze_symbolize_src_elf *src,
|
1209
|
+
const uint64_t *virt_offsets,
|
1210
|
+
size_t virt_offset_cnt);
|
1150
1211
|
|
1151
1212
|
/**
|
1152
1213
|
* Symbolize file offsets in an ELF file.
|
1153
1214
|
*
|
1154
|
-
* On success, the function returns a [`
|
1215
|
+
* On success, the function returns a [`blaze_syms`] containing an
|
1155
1216
|
* array of `file_offset_cnt` [`blaze_sym`] objects. The returned
|
1156
|
-
* object should be released using [`
|
1217
|
+
* object should be released using [`blaze_syms_free`] once it is no
|
1157
1218
|
* longer needed.
|
1158
1219
|
*
|
1159
1220
|
* On error, the function returns `NULL` and sets the thread's last error to
|
@@ -1163,19 +1224,19 @@ const struct blaze_result *blaze_symbolize_elf_virt_offsets(blaze_symbolizer *sy
|
|
1163
1224
|
* # Safety
|
1164
1225
|
* - `symbolizer` needs to point to a valid [`blaze_symbolizer`] object
|
1165
1226
|
* - `src` needs to point to a valid [`blaze_symbolize_src_elf`] object
|
1166
|
-
*
|
1227
|
+
* - `file_offsets` point to an array of `file_offset_cnt` addresses
|
1167
1228
|
*/
|
1168
|
-
const struct
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1229
|
+
const struct blaze_syms *blaze_symbolize_elf_file_offsets(blaze_symbolizer *symbolizer,
|
1230
|
+
const struct blaze_symbolize_src_elf *src,
|
1231
|
+
const uint64_t *file_offsets,
|
1232
|
+
size_t file_offset_cnt);
|
1172
1233
|
|
1173
1234
|
/**
|
1174
1235
|
* Symbolize virtual offsets using "raw" Gsym data.
|
1175
1236
|
*
|
1176
|
-
* On success, the function returns a [`
|
1237
|
+
* On success, the function returns a [`blaze_syms`] containing an
|
1177
1238
|
* array of `virt_offset_cnt` [`blaze_sym`] objects. The returned
|
1178
|
-
* object should be released using [`
|
1239
|
+
* object should be released using [`blaze_syms_free`] once it is no
|
1179
1240
|
* longer needed.
|
1180
1241
|
*
|
1181
1242
|
* On error, the function returns `NULL` and sets the thread's last error to
|
@@ -1185,19 +1246,19 @@ const struct blaze_result *blaze_symbolize_elf_file_offsets(blaze_symbolizer *sy
|
|
1185
1246
|
* # Safety
|
1186
1247
|
* - `symbolizer` needs to point to a valid [`blaze_symbolizer`] object
|
1187
1248
|
* - `src` needs to point to a valid [`blaze_symbolize_src_gsym_data`] object
|
1188
|
-
*
|
1249
|
+
* - `virt_offsets` point to an array of `virt_offset_cnt` addresses
|
1189
1250
|
*/
|
1190
|
-
const struct
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1251
|
+
const struct blaze_syms *blaze_symbolize_gsym_data_virt_offsets(blaze_symbolizer *symbolizer,
|
1252
|
+
const struct blaze_symbolize_src_gsym_data *src,
|
1253
|
+
const uint64_t *virt_offsets,
|
1254
|
+
size_t virt_offset_cnt);
|
1194
1255
|
|
1195
1256
|
/**
|
1196
1257
|
* Symbolize virtual offsets in a Gsym file.
|
1197
1258
|
*
|
1198
|
-
* On success, the function returns a [`
|
1259
|
+
* On success, the function returns a [`blaze_syms`] containing an
|
1199
1260
|
* array of `virt_offset_cnt` [`blaze_sym`] objects. The returned
|
1200
|
-
* object should be released using [`
|
1261
|
+
* object should be released using [`blaze_syms_free`] once it is no
|
1201
1262
|
* longer needed.
|
1202
1263
|
*
|
1203
1264
|
* On error, the function returns `NULL` and sets the thread's last error to
|
@@ -1207,12 +1268,12 @@ const struct blaze_result *blaze_symbolize_gsym_data_virt_offsets(blaze_symboliz
|
|
1207
1268
|
* # Safety
|
1208
1269
|
* - `symbolizer` needs to point to a valid [`blaze_symbolizer`] object
|
1209
1270
|
* - `src` needs to point to a valid [`blaze_symbolize_src_gsym_file`] object
|
1210
|
-
*
|
1271
|
+
* - `virt_offsets` point to an array of `virt_offset_cnt` addresses
|
1211
1272
|
*/
|
1212
|
-
const struct
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1273
|
+
const struct blaze_syms *blaze_symbolize_gsym_file_virt_offsets(blaze_symbolizer *symbolizer,
|
1274
|
+
const struct blaze_symbolize_src_gsym_file *src,
|
1275
|
+
const uint64_t *virt_offsets,
|
1276
|
+
size_t virt_offset_cnt);
|
1216
1277
|
|
1217
1278
|
/**
|
1218
1279
|
* Free an array returned by any of the `blaze_symbolize_*` variants.
|
@@ -1221,10 +1282,10 @@ const struct blaze_result *blaze_symbolize_gsym_file_virt_offsets(blaze_symboliz
|
|
1221
1282
|
* The pointer must have been returned by any of the `blaze_symbolize_*`
|
1222
1283
|
* variants.
|
1223
1284
|
*/
|
1224
|
-
void
|
1285
|
+
void blaze_syms_free(const struct blaze_syms *syms);
|
1225
1286
|
|
1226
1287
|
#ifdef __cplusplus
|
1227
|
-
}
|
1228
|
-
#endif
|
1288
|
+
} // extern "C"
|
1289
|
+
#endif // __cplusplus
|
1229
1290
|
|
1230
|
-
#endif
|
1291
|
+
#endif /* __blazesym_h_ */
|
@@ -848,14 +848,19 @@ typedef struct ddog_crasht_Slice_CharSlice {
|
|
848
848
|
typedef struct ddog_crasht_Config {
|
849
849
|
struct ddog_crasht_Slice_CharSlice additional_files;
|
850
850
|
bool create_alt_stack;
|
851
|
+
bool use_alt_stack;
|
851
852
|
/**
|
852
853
|
* The endpoint to send the crash report to (can be a file://).
|
853
854
|
* If None, the crashtracker will infer the agent host from env variables.
|
854
855
|
*/
|
855
856
|
const struct ddog_Endpoint *endpoint;
|
856
857
|
enum ddog_crasht_StacktraceCollection resolve_frames;
|
857
|
-
|
858
|
-
|
858
|
+
/**
|
859
|
+
* Timeout in milliseconds before the signal handler starts tearing things down to return.
|
860
|
+
* This is given as a uint32_t, but the actual timeout needs to fit inside of an i32 (max
|
861
|
+
* 2^31-1). This is a limitation of the various interfaces used to guarantee the timeout.
|
862
|
+
*/
|
863
|
+
uint32_t timeout_ms;
|
859
864
|
} ddog_crasht_Config;
|
860
865
|
|
861
866
|
typedef struct ddog_crasht_EnvVar {
|
@@ -1183,7 +1188,7 @@ struct ddog_Vec_Tag_PushResult ddog_Vec_Tag_push(struct ddog_Vec_Tag *vec,
|
|
1183
1188
|
DDOG_CHECK_RETURN struct ddog_Vec_Tag_ParseResult ddog_Vec_Tag_parse(ddog_CharSlice string);
|
1184
1189
|
|
1185
1190
|
#ifdef __cplusplus
|
1186
|
-
}
|
1187
|
-
#endif
|
1191
|
+
} // extern "C"
|
1192
|
+
#endif // __cplusplus
|
1188
1193
|
|
1189
|
-
#endif
|
1194
|
+
#endif /* DDOG_COMMON_H */
|
@@ -39,8 +39,7 @@ DDOG_CHECK_RETURN struct ddog_crasht_Result ddog_crasht_shutdown(void);
|
|
39
39
|
* Reinitialize the crash-tracking infrastructure after a fork.
|
40
40
|
* This should be one of the first things done after a fork, to minimize the
|
41
41
|
* chance that a crash occurs between the fork, and this call.
|
42
|
-
* In particular, reset the counters that track the profiler state machine
|
43
|
-
* and start a new receiver to collect data from this fork.
|
42
|
+
* In particular, reset the counters that track the profiler state machine.
|
44
43
|
* NOTE: An alternative design would be to have a 1:many sidecar listening on a
|
45
44
|
* socket instead of 1:1 receiver listening on a pipe, but the only real
|
46
45
|
* advantage would be to have fewer processes in `ps -a`.
|
@@ -73,26 +72,9 @@ struct ddog_crasht_Result ddog_crasht_update_on_fork(struct ddog_crasht_Config c
|
|
73
72
|
* unexpected crash-handling behaviour.
|
74
73
|
*/
|
75
74
|
DDOG_CHECK_RETURN
|
76
|
-
struct ddog_crasht_Result
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
/**
|
81
|
-
* Initialize the crash-tracking infrastructure, writing to an unix socket in case of crash.
|
82
|
-
*
|
83
|
-
* # Preconditions
|
84
|
-
* None.
|
85
|
-
* # Safety
|
86
|
-
* Crash-tracking functions are not reentrant.
|
87
|
-
* No other crash-handler functions should be called concurrently.
|
88
|
-
* # Atomicity
|
89
|
-
* This function is not atomic. A crash during its execution may lead to
|
90
|
-
* unexpected crash-handling behaviour.
|
91
|
-
*/
|
92
|
-
DDOG_CHECK_RETURN
|
93
|
-
struct ddog_crasht_Result ddog_crasht_init_with_unix_socket(struct ddog_crasht_Config config,
|
94
|
-
ddog_CharSlice socket_path,
|
95
|
-
struct ddog_crasht_Metadata metadata);
|
75
|
+
struct ddog_crasht_Result ddog_crasht_init(struct ddog_crasht_Config config,
|
76
|
+
struct ddog_crasht_ReceiverConfig receiver_config,
|
77
|
+
struct ddog_crasht_Metadata metadata);
|
96
78
|
|
97
79
|
/**
|
98
80
|
* Resets all counters to 0.
|
@@ -430,7 +412,7 @@ DDOG_CHECK_RETURN
|
|
430
412
|
struct ddog_crasht_Result ddog_crasht_receiver_entry_point_unix_socket(ddog_CharSlice socket_path);
|
431
413
|
|
432
414
|
#ifdef __cplusplus
|
433
|
-
}
|
434
|
-
#endif
|
415
|
+
} // extern "C"
|
416
|
+
#endif // __cplusplus
|
435
417
|
|
436
|
-
#endif
|
418
|
+
#endif /* DDOG_CRASHTRACKER_H */
|
@@ -388,7 +388,7 @@ struct ddog_prof_Profile_Result ddog_prof_Profile_reset(struct ddog_prof_Profile
|
|
388
388
|
const struct ddog_Timespec *start_time);
|
389
389
|
|
390
390
|
#ifdef __cplusplus
|
391
|
-
}
|
392
|
-
#endif
|
391
|
+
} // extern "C"
|
392
|
+
#endif // __cplusplus
|
393
393
|
|
394
|
-
#endif
|
394
|
+
#endif /* DDOG_PROFILING_H */
|