Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: Ignore more thread sanitizer warnings in code #3923

Merged
merged 5 commits into from
Apr 30, 2024

Conversation

philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Apr 30, 2024

Ignore the thread sanitizer in the code where possible, which has the advantage of knowing a method is ignored when reading the code and not jumping to the ThreadSanitizer.sup file. Furthermore, use the ThreadSanitizer.sup file not only for tests but for the Run Xcode schemes.

This PR is based on #3922.

#skip-changelog

The ThreadSanitizer reports data races for the SentryFramesTracker,
which we can ignore.

Fixes GH-3702
Ignore the thread sanitizer in the code where possible, which has the
advantage of knowing a method is ignored when reading the code and not
jumping to the ThreadSanitizer.sup file. Furthermore, use the
ThreadSanitizer.sup file not only for tests but for the Run Xcode
schemes.
Copy link

codecov bot commented Apr 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.648%. Comparing base (e887ddc) to head (63b9c93).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3923       +/-   ##
=============================================
- Coverage   90.687%   90.648%   -0.039%     
=============================================
  Files          582       582               
  Lines        45521     45524        +3     
  Branches     16220     16223        +3     
=============================================
- Hits         41282     41267       -15     
- Misses        4060      4075       +15     
- Partials       179       182        +3     
Files Coverage Δ
...ntryTestUtils/TestSentryDispatchQueueWrapper.swift 91.111% <100.000%> (+0.413%) ⬆️
Sources/Sentry/SentryDependencyContainer.m 95.918% <ø> (ø)
Sources/Sentry/SentryFramesTracker.m 99.173% <ø> (ø)
Sources/Sentry/SentryTracer.m 96.650% <ø> (-0.240%) ⬇️
Sources/Sentry/include/SentryInternalDefines.h 66.666% <ø> (ø)
...ording/Monitors/SentryCrashMonitor_MachException.c 35.443% <ø> (ø)
...rces/SentryCrash/Recording/SentryCrashCachedData.c 85.858% <ø> (ø)
Tests/SentryTests/SentryCrash/TestThread.m 100.000% <ø> (ø)

... and 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e887ddc...63b9c93. Read the comment docs.

Copy link

github-actions bot commented Apr 30, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1223.62 ms 1250.48 ms 26.86 ms
Size 21.58 KiB 616.76 KiB 595.17 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
03d9eb5 1227.35 ms 1231.24 ms 3.90 ms
6813f7c 1232.23 ms 1251.47 ms 19.24 ms
c6773e5 1222.48 ms 1240.02 ms 17.54 ms
236d8a8 1232.33 ms 1255.55 ms 23.22 ms
0001a09 1223.90 ms 1249.56 ms 25.66 ms
591a01b 1197.94 ms 1222.53 ms 24.59 ms
645f63f 1231.33 ms 1247.51 ms 16.18 ms
f0283e8 1253.36 ms 1263.12 ms 9.76 ms
1ce939e 1216.79 ms 1242.38 ms 25.59 ms
60dd0f5 1239.94 ms 1252.54 ms 12.60 ms

App size

Revision Plain With Sentry Diff
03d9eb5 20.76 KiB 436.33 KiB 415.57 KiB
6813f7c 21.58 KiB 614.86 KiB 593.28 KiB
c6773e5 20.76 KiB 435.25 KiB 414.49 KiB
236d8a8 21.58 KiB 418.70 KiB 397.12 KiB
0001a09 20.76 KiB 433.19 KiB 412.43 KiB
591a01b 22.84 KiB 401.67 KiB 378.83 KiB
645f63f 21.58 KiB 572.91 KiB 551.33 KiB
f0283e8 20.76 KiB 393.36 KiB 372.60 KiB
1ce939e 22.85 KiB 412.98 KiB 390.13 KiB
60dd0f5 20.76 KiB 393.36 KiB 372.60 KiB

Previous results on branch: ref/ignore-thread-sanitizer-in-code

Startup times

Revision Plain With Sentry Diff
375446b 1211.45 ms 1229.77 ms 18.32 ms

App size

Revision Plain With Sentry Diff
375446b 21.58 KiB 616.72 KiB 595.14 KiB

Base automatically changed from fix/frames-tracker-data-races to main April 30, 2024 14:35
@philipphofmann philipphofmann merged commit 265f000 into main Apr 30, 2024
68 of 70 checks passed
@philipphofmann philipphofmann deleted the ref/ignore-thread-sanitizer-in-code branch April 30, 2024 15:24
philipphofmann added a commit that referenced this pull request May 6, 2024
Ignore the thread sanitizer in the code where possible, which has the
advantage of knowing a method is ignored when reading the code and not
jumping to the ThreadSanitizer.sup file. Furthermore, use the
ThreadSanitizer.sup file not only for tests but for the Run Xcode
schemes.
dKasabwala pushed a commit to dKasabwala/sentry-cocoa that referenced this pull request May 6, 2024
Ignore the thread sanitizer in the code where possible, which has the
advantage of knowing a method is ignored when reading the code and not
jumping to the ThreadSanitizer.sup file. Furthermore, use the
ThreadSanitizer.sup file not only for tests but for the Run Xcode
schemes.
threema-matteo pushed a commit to threema-ch/sentry-cocoa that referenced this pull request May 21, 2024
Ignore the thread sanitizer in the code where possible, which has the
advantage of knowing a method is ignored when reading the code and not
jumping to the ThreadSanitizer.sup file. Furthermore, use the
ThreadSanitizer.sup file not only for tests but for the Run Xcode
schemes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants