View Issue Details

IDProjectCategoryView StatusLast Update
0005296Spring engineGeneralpublic2016-10-09 21:52
Reporterlamer Assigned Toabma  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version102.0+git 
Target Version104.0 
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

Activities

hokomoko

2016-07-10 14:03

developer   ~0016489

:D

abma

2016-07-19 00:46

administrator   ~0016522

Last edited: 2016-07-19 00:46

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

abma

2016-07-19 01:03

administrator   ~0016523

@lamer:

thanks a lot for finding + reporting this!

abma

2016-07-19 02:07

administrator   ~0016524

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)

abma

2016-09-17 03:16

administrator   ~0016677

would be using an enum for this the best?

-> no hashing needed at all

hokomoko

2016-09-18 11:11

developer   ~0016684

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).

abma

2016-10-09 21:52

administrator   ~0016757

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

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
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