2019-12-14 22:42 CET

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0005296Spring engineGeneralpublic2016-10-09 21:52
Reporterlamer 
Assigned Toabma 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version102.0+git 
Target Version104.0Fixed in Version 
Summary0005296: SCOPED_TIMER hash collision
Descriptionname: "PathManager::Update"
hash: 1842

name: "AI t:3 id:3 CircuitAI 0.9"
hash: 1842

And so profiler lies about AI's time.
Steps To Reproduce1) Add 4+ CircuitAI's
2) /debug
Additional InformationFailer: https://github.com/spring/spring/blob/102.0/rts/System/TimeProfiler.cpp#L31
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0016489

hokomoko (developer)

:D

~0016522

abma (administrator)

Last edited: 2016-07-19 00:46

View 2 revisions

IMHO major as these values are very important. any error here will cost us A LOT of time.

~0016523

abma (administrator)

@lamer:

thanks a lot for finding + reporting this!

~0016524

abma (administrator)

one of the FNV-variants could be an alternative:
http://isthe.com/chongo/tech/comp/fnv/

(replacing the function is low prio i guess, but adding the assert imo was important)

~0016677

abma (administrator)

would be using an enum for this the best?

-> no hashing needed at all

~0016684

hokomoko (developer)

1) hash function was improved considerably here:
https://github.com/spring/spring/commit/741aa393454a738d57e0c04f224108040bfaaa07
so I believe we won't hit any collision in the foreseeable future.
2) I prefer not using enums since they prevent creating new timers on the fly (like AIs do).

~0016757

abma (administrator)

the asserts hopefully alert us when we hit the next collision :)
+Notes

-Related Changesets
spring: develop 741aa393
Timestamp: 2016-09-09 16:41:35
Author: hokomoko
Details ] Diff ]
SCOPED_TIMER reorganisation and cleanup

Now they're not named exactly according to class but according to hierarchy:
Every timer with the name "A::B" will be counted within timer "A" to make it easier to see who's part of what.

Unfortunately, there are still too many to be shown at the same time on the debug screen.

Also improved hash a bit to prevent collisions
mod - rts/ExternalAI/EngineOutHandler.cpp Diff ] File ]
mod - rts/ExternalAI/SkirmishAIWrapper.cpp Diff ] File ]
mod - rts/Game/Game.cpp Diff ] File ]
mod - rts/Game/UI/MiniMap.cpp Diff ] File ]
mod - rts/Game/UI/ProfileDrawer.cpp Diff ] File ]
mod - rts/Game/UI/ResourceBar.cpp Diff ] File ]
mod - rts/Lua/LuaUtils.cpp Diff ] File ]
mod - rts/Map/BasicMapDamage.cpp Diff ] File ]
mod - rts/Map/ReadMap.cpp Diff ] File ]
mod - rts/Map/SMF/ROAM/Patch.cpp Diff ] File ]
mod - rts/Map/SMF/ROAM/RoamMeshDrawer.cpp Diff ] File ]
mod - rts/Map/SMF/SMFGroundDrawer.cpp Diff ] File ]
mod - rts/Net/NetCommands.cpp Diff ] File ]
mod - rts/Rendering/Env/AdvSky.cpp Diff ] File ]
mod - rts/Rendering/Env/BasicSky.cpp Diff ] File ]
mod - rts/Rendering/Env/BumpWater.cpp Diff ] File ]
mod - rts/Rendering/Env/Decals/DecalsDrawerGL4.cpp Diff ] File ]
mod - rts/Rendering/Env/Decals/LegacyTrackHandler.cpp Diff ] File ]
mod - rts/Rendering/Env/GrassDrawer.cpp Diff ] File ]
mod - rts/Rendering/GL/myGL.cpp Diff ] File ]
mod - rts/Rendering/Map/InfoTexture/Legacy/LegacyInfoTextureHandler.cpp Diff ] File ]
mod - rts/Rendering/Map/InfoTexture/Modern/AirLos.cpp Diff ] File ]
mod - rts/Rendering/Map/InfoTexture/Modern/InfoTextureHandler.cpp Diff ] File ]
mod - rts/Rendering/Map/InfoTexture/Modern/Los.cpp Diff ] File ]
mod - rts/Rendering/Map/InfoTexture/Modern/Radar.cpp Diff ] File ]
mod - rts/Rendering/Textures/Bitmap.cpp Diff ] File ]
mod - rts/Rendering/Textures/NamedTextures.cpp Diff ] File ]
mod - rts/Rendering/WorldDrawer.cpp Diff ] File ]
mod - rts/Sim/Features/FeatureHandler.cpp Diff ] File ]
mod - rts/Sim/Misc/LosHandler.cpp Diff ] File ]
mod - rts/Sim/MoveTypes/GroundMoveType.cpp Diff ] File ]
mod - rts/Sim/Path/Default/PathEstimator.cpp Diff ] File ]
mod - rts/Sim/Path/Default/PathManager.cpp Diff ] File ]
mod - rts/Sim/Path/QTPFS/PathManager.cpp Diff ] File ]
mod - rts/Sim/Projectiles/ProjectileHandler.cpp Diff ] File ]
mod - rts/Sim/Units/Scripts/CobEngine.cpp Diff ] File ]
mod - rts/Sim/Units/Scripts/UnitScriptEngine.cpp Diff ] File ]
mod - rts/Sim/Units/UnitHandler.cpp Diff ] File ]
mod - rts/System/Input/InputHandler.cpp Diff ] File ]
mod - rts/System/Sound/OpenAL/Sound.cpp Diff ] File ]
mod - rts/System/SpringApp.cpp Diff ] File ]
mod - rts/System/TimeProfiler.cpp Diff ] File ]

+Related Changesets

-Issue History
Date Modified Username Field Change
2016-07-10 13:43 lamer New Issue
2016-07-10 14:03 hokomoko Note Added: 0016489
2016-07-19 00:46 abma Severity minor => major
2016-07-19 00:46 abma Note Added: 0016522
2016-07-19 00:46 abma Note Edited: 0016522 View Revisions
2016-07-19 00:48 abma Target Version => 103.0
2016-07-19 01:03 abma Note Added: 0016523
2016-07-19 02:07 abma Note Added: 0016524
2016-07-19 15:28 abma Target Version 103.0 => 104.0
2016-09-17 03:16 abma Note Added: 0016677
2016-09-18 11:11 hokomoko Note Added: 0016684
2016-09-18 11:12 hokomoko Changeset attached => spring develop 741aa393
2016-10-09 21:52 abma Note Added: 0016757
2016-10-09 21:52 abma Status new => resolved
2016-10-09 21:52 abma Resolution open => fixed
2016-10-09 21:52 abma Assigned To => abma
+Issue History