Page MenuHomeWildfire Games

Don't crash when calling the profiler from a 'non-main' thread (D14 outtake)
ClosedPublic

Authored by wraitii on May 1 2019, 10:46 AM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP22248: Don't crash when calling the profiler from a 'non-main' thread
Summary

D14 outtake.

Motive behind the change: calls to Profile() currently crash unless they are triggered from the main thread, but it's somewhat difficult to know that from the code. It makes more sense to silently ignore those particularly so we can easily have the same code be threaded or not.

This switches a few Profile3 to Profile2 as Profile3 doesn't make much sense for those.

Test Plan

Look at the code.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/simulation2/helpers/Render.cpp
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2017"
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1311/display/redirect

This revision was not accepted when it landed; it landed in state Needs Review.May 4 2019, 5:03 PM
This revision was automatically updated to reflect the committed changes.