Skip to content

Commit eae6668

Browse files
authored
Update libdatadog and bump to 1.9.0 (#3229)
* Update libdatadog and bump to 1.9.0 Signed-off-by: Bob Weinand <[email protected]> * Bump the libdatadog version Signed-off-by: Bob Weinand <[email protected]> * Fix profiling with v18 Signed-off-by: Bob Weinand <[email protected]> * Fix Windows VirtualProtect call Signed-off-by: Bob Weinand <[email protected]> * Add alloc feature from allocator-api2 Signed-off-by: Bob Weinand <[email protected]> --------- Signed-off-by: Bob Weinand <[email protected]>
1 parent af4e982 commit eae6668

File tree

14 files changed

+182
-291
lines changed

14 files changed

+182
-291
lines changed

Cargo.lock

Lines changed: 124 additions & 193 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ RUN_TESTS_CMD := REPORT_EXIT_STATUS=1 TEST_PHP_SRCDIR=$(PROJECT_ROOT) USE_TRACKE
4646

4747
C_FILES = $(shell find components components-rs ext src/dogstatsd zend_abstract_interface -name '*.c' -o -name '*.h' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
4848
TEST_FILES = $(shell find tests/ext -name '*.php*' -o -name '*.inc' -o -name '*.json' -o -name '*.yaml' -o -name 'CONFLICTS' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
49-
RUST_FILES = $(BUILD_DIR)/Cargo.toml $(BUILD_DIR)/Cargo.lock $(shell find components-rs -name '*.c' -o -name '*.rs' -o -name 'Cargo.toml' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' ) $(shell find libdatadog/{alloc,build-common,crashtracker,crashtracker-ffi,data-pipeline,ddcommon,ddcommon-ffi,ddsketch,ddtelemetry,ddtelemetry-ffi,dogstatsd-client,dynamic-configuration,ipc,library-config,library-config-ffi,live-debugger,live-debugger-ffi,remote-config,sidecar,sidecar-ffi,spawn_worker,tinybytes,tools/{cc_utils,sidecar_mockgen},trace-*,Cargo.toml} -type f \( -path "*/src*" -o -path "*/examples*" -o -path "*Cargo.toml" -o -path "*/build.rs" -o -path "*/tests/dataservice.rs" -o -path "*/tests/service_functional.rs" \) -not -path "*/ipc/build.rs" -not -path "*/sidecar-ffi/build.rs")
49+
RUST_FILES = $(BUILD_DIR)/Cargo.toml $(BUILD_DIR)/Cargo.lock $(shell find components-rs -name '*.c' -o -name '*.rs' -o -name 'Cargo.toml' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' ) $(shell find libdatadog/{datadog-alloc,build-common,datadog-crashtracker,datadog-crashtracker-ffi,data-pipeline,ddcommon,ddcommon-ffi,ddsketch,ddtelemetry,ddtelemetry-ffi,dogstatsd-client,datadog-dynamic-configuration,datadog-ipc,datadog-ipc-macros,datadog-library-config,datadog-library-config-ffi,datadog-live-debugger,datadog-live-debugger-ffi,datadog-remote-config,datadog-sidecar,datadog-sidecar-ffi,datadog-sidecar-macros,spawn_worker,tinybytes,tools/{cc_utils,sidecar_mockgen},datadog-trace-*,Cargo.toml} -type f \( -path "*/src*" -o -path "*/examples*" -o -path "*Cargo.toml" -o -path "*/build.rs" -o -path "*/tests/dataservice.rs" -o -path "*/tests/service_functional.rs" \) -not -path "*/datadog-ipc/build.rs" -not -path "*/datadog-sidecar-ffi/build.rs")
5050
ALL_OBJECT_FILES = $(C_FILES) $(RUST_FILES) $(BUILD_DIR)/Makefile
5151
TEST_OPCACHE_FILES = $(shell find tests/opcache -name '*.php*' -o -name '.gitkeep' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
5252
TEST_STUB_FILES = $(shell find tests/ext -type d -name 'stubs' -exec find '{}' -type f \; | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
@@ -419,19 +419,19 @@ generate_cbindgen: cbindgen_binary # Regenerate components-rs/ddtrace.h componen
419419
--config ddcommon-ffi/cbindgen.toml \
420420
--output $(PROJECT_ROOT)/components-rs/common.h; \
421421
$(command rustup && echo run nightly --) cbindgen --crate datadog-live-debugger-ffi \
422-
--config live-debugger-ffi/cbindgen.toml \
422+
--config datadog-live-debugger-ffi/cbindgen.toml \
423423
--output $(PROJECT_ROOT)/components-rs/live-debugger.h; \
424424
$(command rustup && echo run nightly --) cbindgen --crate ddtelemetry-ffi \
425425
--config ddtelemetry-ffi/cbindgen.toml \
426426
--output $(PROJECT_ROOT)/components-rs/telemetry.h; \
427427
$(command rustup && echo run nightly --) cbindgen --crate datadog-sidecar-ffi \
428-
--config sidecar-ffi/cbindgen.toml \
428+
--config datadog-sidecar-ffi/cbindgen.toml \
429429
--output $(PROJECT_ROOT)/components-rs/sidecar.h; \
430430
$(command rustup && echo run nightly --) cbindgen --crate datadog-crashtracker-ffi \
431-
--config crashtracker-ffi/cbindgen.toml \
431+
--config datadog-crashtracker-ffi/cbindgen.toml \
432432
--output $(PROJECT_ROOT)/components-rs/crashtracker.h; \
433433
$(command rustup && echo run nightly --) cbindgen --crate datadog-library-config-ffi \
434-
--config library-config-ffi/cbindgen.toml \
434+
--config datadog-library-config-ffi/cbindgen.toml \
435435
--output $(PROJECT_ROOT)/components-rs/library-config.h; \
436436
if test -d $(PROJECT_ROOT)/tmp; then \
437437
mkdir -pv "$(BUILD_DIR)"; \

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.0
1+
1.9.0

components-rs/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ ddcommon = { path = "../libdatadog/ddcommon", features = ["cgroup_testing"] }
1212
ddcommon-ffi = { path = "../libdatadog/ddcommon-ffi", default-features = false }
1313
ddtelemetry = { path = "../libdatadog/ddtelemetry" }
1414
ddtelemetry-ffi = { path = "../libdatadog/ddtelemetry-ffi", default-features = false }
15-
datadog-dynamic-configuration = { path = "../libdatadog/dynamic-configuration" }
16-
datadog-live-debugger = { path = "../libdatadog/live-debugger" }
17-
datadog-live-debugger-ffi = { path = "../libdatadog/live-debugger-ffi", default-features = false }
18-
datadog-ipc = { path = "../libdatadog/ipc" }
19-
datadog-remote-config = { path = "../libdatadog/remote-config" }
20-
datadog-sidecar = { path = "../libdatadog/sidecar" }
21-
datadog-sidecar-ffi = { path = "../libdatadog/sidecar-ffi" }
22-
datadog-crashtracker-ffi = { path = "../libdatadog/crashtracker-ffi", default-features = false, features = ["collector"] }
23-
datadog-library-config-ffi = { path = "../libdatadog/library-config-ffi", default-features = false }
15+
datadog-dynamic-configuration = { path = "../libdatadog/datadog-dynamic-configuration" }
16+
datadog-live-debugger = { path = "../libdatadog/datadog-live-debugger" }
17+
datadog-live-debugger-ffi = { path = "../libdatadog/datadog-live-debugger-ffi", default-features = false }
18+
datadog-ipc = { path = "../libdatadog/datadog-ipc" }
19+
datadog-remote-config = { path = "../libdatadog/datadog-remote-config" }
20+
datadog-sidecar = { path = "../libdatadog/datadog-sidecar" }
21+
datadog-sidecar-ffi = { path = "../libdatadog/datadog-sidecar-ffi" }
22+
datadog-crashtracker-ffi = { path = "../libdatadog/datadog-crashtracker-ffi", default-features = false, features = ["collector"] }
23+
datadog-library-config-ffi = { path = "../libdatadog/datadog-library-config-ffi", default-features = false }
2424
spawn_worker = { path = "../libdatadog/spawn_worker" }
2525
anyhow = { version = "1.0" }
2626
const-str = "0.5.6"

components-rs/common.h

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,23 +1334,6 @@ typedef struct ddog_StringWrapperResult {
13341334
};
13351335
} ddog_StringWrapperResult;
13361336

1337-
typedef enum ddog_LibraryConfigName {
1338-
DDOG_LIBRARY_CONFIG_NAME_DD_APM_TRACING_ENABLED,
1339-
DDOG_LIBRARY_CONFIG_NAME_DD_RUNTIME_METRICS_ENABLED,
1340-
DDOG_LIBRARY_CONFIG_NAME_DD_LOGS_INJECTION,
1341-
DDOG_LIBRARY_CONFIG_NAME_DD_PROFILING_ENABLED,
1342-
DDOG_LIBRARY_CONFIG_NAME_DD_DATA_STREAMS_ENABLED,
1343-
DDOG_LIBRARY_CONFIG_NAME_DD_APPSEC_ENABLED,
1344-
DDOG_LIBRARY_CONFIG_NAME_DD_IAST_ENABLED,
1345-
DDOG_LIBRARY_CONFIG_NAME_DD_DYNAMIC_INSTRUMENTATION_ENABLED,
1346-
DDOG_LIBRARY_CONFIG_NAME_DD_DATA_JOBS_ENABLED,
1347-
DDOG_LIBRARY_CONFIG_NAME_DD_APPSEC_SCA_ENABLED,
1348-
DDOG_LIBRARY_CONFIG_NAME_DD_TRACE_DEBUG,
1349-
DDOG_LIBRARY_CONFIG_NAME_DD_SERVICE,
1350-
DDOG_LIBRARY_CONFIG_NAME_DD_ENV,
1351-
DDOG_LIBRARY_CONFIG_NAME_DD_VERSION,
1352-
} ddog_LibraryConfigName;
1353-
13541337
typedef enum ddog_LibraryConfigSource {
13551338
DDOG_LIBRARY_CONFIG_SOURCE_LOCAL_STABLE_CONFIG = 0,
13561339
DDOG_LIBRARY_CONFIG_SOURCE_FLEET_STABLE_CONFIG = 1,
@@ -1409,7 +1392,7 @@ typedef struct ddog_CString {
14091392
} ddog_CString;
14101393

14111394
typedef struct ddog_LibraryConfig {
1412-
enum ddog_LibraryConfigName name;
1395+
struct ddog_CString name;
14131396
struct ddog_CString value;
14141397
enum ddog_LibraryConfigSource source;
14151398
struct ddog_CString config_id;

components-rs/crashtracker.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ struct ddog_StringWrapperResult ddog_crasht_demangle(ddog_CharSlice name,
822822
* signal handler is dangerous, so we fork a sidecar to do the stuff we aren't
823823
* allowed to do in the handler.
824824
*
825-
* See comments in [crashtracker/lib.rs] for a full architecture description.
825+
* See comments in [datadog-crashtracker/lib.rs] for a full architecture description.
826826
* # Safety
827827
* No safety concerns
828828
*/
@@ -836,7 +836,7 @@ DDOG_CHECK_RETURN struct ddog_VoidResult ddog_crasht_receiver_entry_point_stdin(
836836
* signal handler is dangerous, so we fork a sidecar to do the stuff we aren't
837837
* allowed to do in the handler.
838838
*
839-
* See comments in [profiling/crashtracker/mod.rs] for a full architecture
839+
* See comments in [datadog-crashtracker/lib.rs] for a full architecture
840840
* description.
841841
* # Safety
842842
* No safety concerns

components-rs/library-config.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ void ddog_library_configurator_drop(struct ddog_Configurator*);
3030

3131
struct ddog_Result_VecLibraryConfig ddog_library_configurator_get(const struct ddog_Configurator *configurator);
3232

33-
/**
34-
* Returns a static null-terminated string, containing the name of the environment variable
35-
* associated with the library configuration
36-
*/
37-
struct ddog_CStr ddog_library_config_name_to_env(enum ddog_LibraryConfigName name);
38-
3933
/**
4034
* Returns a static null-terminated string, containing the name of the environment variable
4135
* associated with the library configuration

ddtrace.sym

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ ddog_library_configurator_with_local_path
2525
ddog_library_configurator_with_fleet_path
2626
ddog_library_configurator_with_detect_process_info
2727
ddog_library_configurator_get
28-
ddog_library_config_name_to_env
2928
ddog_library_config_source_to_string
3029
ddog_library_config_drop
3130
ddog_Error_drop

ext/ddtrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ static void dd_patch_zend_call_known_function(void) {
257257

258258
#ifdef _WIN32
259259
DWORD old_protection;
260-
if (VirtualProtect(page, page_size, PAGE_READWRITE, &old_protection))
260+
if (!VirtualProtect(page, page_size, PAGE_READWRITE, &old_protection))
261261
#else
262262
if (mprotect(page, page_size, PROT_READ | PROT_WRITE) != 0)
263263
#endif

libdatadog

Submodule libdatadog updated 466 files

0 commit comments

Comments
 (0)