Repository navigation
obs-c-oracle: Drop timer stand-ins Rust defines - #4811
Merged
Merged
Conversation
The source profiler shim calls gs_timer_destroy, _begin, _end, _get_data and their gs_timer_range_* twins, which obs-graphics now defines. oracle/source_profiler_host.c still defines do-nothing stand-ins under the same names, so a binary that links both has two definitions: the port_comparison bench fails to link with eight duplicate gs_timer_* symbols. Add a test to the core test binary that calls gs_timer_destroy and gs_timer_range_destroy with no graphics context and checks that they log what obs-graphics' dispatch logs. With the stand-ins winning the link, nothing is logged and the test fails. Refs #4786. Refs #4615.
The timer and timer-range dispatch ports made gs_timer_destroy, _begin, _end, _get_data and the four gs_timer_range_* twins Rust entry points in obs-graphics. oracle/source_profiler_host.c still defined do-nothing stand-ins under the same names for the source profiler shim, so the port_comparison bench, which links obs-graphics, failed with eight duplicate symbols. Drop those eight stand-ins and keep gs_timer_create, gs_timer_range_create and the libobs stand-ins that are still C. With no graphics context the Rust entry points do nothing and return false, as the stand-ins did, so the source profiler parity is unchanged. Fixes #4786. Fixes #4615. Local-Gate: v1 tree=4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94 secs=2494 lanes=lint:run,dylint:run,rust-test:run,cross:run,tier2-linux:run,macos-native:n/a,windows-native:n/a,client-checks:run,client-swift:n/a,client-lint:run,client-test:run,client-test-x86_64-unknown-linux-gnu:run,client-test-aarch64-unknown-linux-gnu:n/a,client-test-x86_64-pc-windows-msvc:n/a,client-test-aarch64-pc-windows-msvc:n/a,client-test-x86_64-apple-darwin:n/a,client-test-aarch64-apple-darwin:n/a Ci-Attestation: {"at":1794542277,"gate":"rust/all/fmt","host":"linux-x86_64","key":"06d36fb5278a539316bff66f4382fa71b018a99396b742dae475c741a7d17fa8","lane":"lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":61,"stamp":"e993232d16168d83074dbf70fd0c301c","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"06d36fb5278a539316bff66f4382fa71b018a99396b742dae475c741a7d17fa8","lane":"lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":61,"stamp":"84dd83775a5dc63336dcd0badca15c2a","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"7f7aceb3744dd33140b6929f22a7dbe223642c5b77259b393465e39337990b47","lane":"dylint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":0,"stamp":"9dcbf6763f1c794bbc457445e663b0c0","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"6bf5ba160e00a424e277fba880b50fcf8fcd6ae94847fa4beaba56cc8e196f20","lane":"rust-test","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":288,"stamp":"e15d2d170b00f43ea308e017546333c8","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"3a5c32f3a177be1de4f0e12b436f7c85e85464fe7e74a3ae444f13b4314d06a9","lane":"cross","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":567,"stamp":"3a35447c0526135864b342690aeb91ad","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"3a5c32f3a177be1de4f0e12b436f7c85e85464fe7e74a3ae444f13b4314d06a9","lane":"cross","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":567,"stamp":"6632322a9d8019409c39605ddd9a973f","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"3a5c32f3a177be1de4f0e12b436f7c85e85464fe7e74a3ae444f13b4314d06a9","lane":"cross","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":567,"stamp":"bd166fee6fa71c8ee644a64f70664ccf","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"3a5c32f3a177be1de4f0e12b436f7c85e85464fe7e74a3ae444f13b4314d06a9","lane":"cross","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":567,"stamp":"31c489b0aced21aace01b07c334b6c97","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"9777453c492b79cddc09f10405d4b57fa8d9c3e4ec9163ccfde1f620696b9f95","lane":"tier2-linux","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":2493,"stamp":"1e6552bb07c726868c8c7dbce67cdf2a","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"python/all/self-test","host":"linux-x86_64","key":"3cdc5de65765a2beb9ddfbc1fca0e2130a7cc09898055d78ea3a3a6c40529af1","lane":"client-checks","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":65,"stamp":"b9d757281c46cfebdbc09020e4b6c289","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"general/all/client-lint","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"38d2e2c599c264f69d4eb1a6f4ae88d7","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"78baec8ba99938fecc1bcd54b75cb7d0","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"9159a23a3fa4195d5507051509adf181","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"4ac8373241ed23c2b058e30bf0bb6ee6","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"56eb2c7e894e9c3d70e8ff3a2f8baaf0","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"690f550516a559fdd987fbc3305480c9","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"98fa00500374a32d55785e20b2f2d673","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"27d75dd9c3f8b86fb5eecdc83a7afadc","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"f6c1ae1df121b439373657f6e03d6646","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"5c092fb854f15d7a1d45865ae793b211","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"3c2811dc5b8467e773fff7e518adc4a0","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"88e841528b58a0e589ec4376282d7893","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"ab657eea7d34328929892e47d61617dbc4eb7cf65600785f2d84e82f648897b9","lane":"client-lint","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":73,"stamp":"7f2ba097977861e177fefa97ea5dc6c9","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"} Ci-Attestation: {"at":1794542277,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"34b50307ba88a285cd5f747a67f882b116d79e9c18c58dd3241688c87cc3f6f3","lane":"client-test-x86_64-unknown-linux-gnu","parents":["a018317d4c87673b753419a77be0eeaece267aa0"],"secs":281,"stamp":"d5cb1c65f8da68bd85466cb18f5dea88","tree":"4d9e6e90d641da995d4e462a5ad3f0e3e60a4f94","v":1,"via":"run"}
Collaborator
Author
|
Handed off to the coordinator |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4786
Fixes #4615
What and why
soldr cargo test -p obs-c-oracle --locked --bench port_comparisonstopped linking on master after the timer dispatch port (#4557) and the timer-range dispatch port (#4595): those madegs_timer_destroy,gs_timer_begin,gs_timer_end,gs_timer_get_dataand the fourgs_timer_range_*twins Rust entry points inobs-graphics, which the bench links, whilerust/obs-c-oracle/oracle/source_profiler_host.cstill defined do-nothing stand-ins under the same names for the source profiler shim. The bench is not part of PR CI, so both ports were green.This drops those eight stand-ins and keeps
gs_timer_create,gs_timer_range_createand the libobs stand-ins that are still C. Every binary that links the source profiler shim (the core test binary and the bench) also linksobs-graphics, and with no graphics context the Rust entry points do nothing and return false, as the stand-ins did, so the source profiler parity is unchanged. The file's header comment says so. Test-only change: nothing in libobs or the shipped library changes.Since PR CI does not run the bench, the RED commit adds
shim_timers_are_obs_graphics_dispatchto the source profiler parity tests inobs-tests-core, which PR CI does run: it callsgs_timer_destroyandgs_timer_range_destroywith no graphics context and checks they log whatobs-graphics' dispatch logs (<name>: called while not in a graphics context). While the stand-ins exist they can win the link instead, log nothing, and the test fails.#4615 and #4786 report the same failure; this closes both. No upstream issue.
RED → GREEN
test: Pin the source profiler's timer entry points).obs_core::source_profiler_parity::shim_timers_are_obs_graphics_dispatchfails:left: Ok(""),right: Ok("gs_timer_destroy: called while not in a graphics context");--test-diff: 8437 passed, 1 failed (that test), 6 skipped. On the same tree the bench fails to link with eightrust-lld: error: duplicate symbol: gs_timer_*errors (gs_timer_destroy,_begin,_end,_get_data,gs_timer_range_destroy,_begin,_end,_get_data), thencould not compile obs-c-oracle (bench "port_comparison").source_profiler_frame/rustand/c, with its per-module allocation check. Source profiler tests inobs-tests-core: 37 passed.--test-diff origin/master: 8438 passed, 6 skipped.--lane lint,--lane dylint,--lane cross, Windows MSVCclippy --workspace --all-targets -D warningsandci/windows_link_check.py(every test binary linked for MSVC) pass. Runs were on 736f08f728 (GREEN) and fe5ab04bde (RED); after the rebase,./unittest(Rust 8438 passed, 6 skipped; Tier 2 922/922 on hybrid and on the C reference), the bench, dylint, cross and Windows clippy were rerun, and the head is stamped by the local gate.Checklist
master(or the description starts with a Stacked: note)docs/features.mdis added or updated (not applicable: no user-visible change)-W..., ratchets): built with scripting ON (PR CI builds no OBS app: rungh workflow run ci.yml --ref <branch>for the full builds) and cross-checked with clang and MSVC (not applicable: no warning or flag change)