-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
briansull
commented
Oct 11, 2019
•
edited
Loading
edited
- Use info.compFullName as the input to create the JIT's MethodHash
- Update JitOrder to print out MethodHash and PerfScore
- Change eeGetMethodFullName to expand class and struct names for the argument types and the return type
- fixed issue where bad edge weight were set in fgFoldConditional
- Made flEdgeWeightMin and flEdgeWeightMax private fields
- Added new method setNewEdgeWeights
- Added support method eeGetArgClass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good to me.
8ef99c5
to
64c0ea9
Compare
@BruceForstall @dotnet/jit-contrib PTAL |
I don't think you should add the JitOrderParser to the coreclr repo; I think you should put it in the jitutils repo instead. The jitOrderParser.cs file also needs a license header, and the filenames there should probably be all lower case to avoid future Linux issues. |
I agree |
printf(" mdToken | | RGN | Count | EH | FRM | LOOP | NRM | IND | BBs | Cnt | Cnt | Cnt | Alloc | IL | HOT | COLD | method name \n"); | ||
printf("---------+-----+------+----------+----+-----+------+-----+-----+-----+-----+-----+-----+---------+------+-------+-------+-----------\n"); | ||
// 06001234 | PRF | HOT | 219 | EH | ebp | LOOP | 15 | 6 | 12 | 17 | 12 | 8 | 28 p2 | 145 | 211 | 123 | System.Example(int) | ||
printf(" | Profiled | Method | Method has | calls | Num |LclV |AProp| CSE | Perf |bytes | %3s codesize| \n", Target::g_tgtCPUName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What perfscore gets output on platforms that are missing full support like arm*?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default PerfScore algorithm counts each instruction executed as 1 unit.
Update JitOrder to print out MethodHash and PerfScore Change eeGetMethodFullName to expand class and struct names for the argument types and the return type Fixed issue where bad edge weight were set in fgFoldConditional Made flEdgeWeightMin and flEdgeWeightMax private fields Added new method setEdgeWeights Added support method eeGetArgClass Added source for Tool to parse JitOrder output and associate PerfScores
9379b1b
to
9c0c056
Compare
@BruceForstall @jashook @dotnet/jit-contrib PTAL With this change we will get unique hashes for all methods that have different signatures. |
Seems like the edge weight changes are unrelated to the rest and should be a separate PR. I'd hoped that we could get rid of the min/max weight scheme as it's just confusing. Why bother having two weights? Which one is more trustworthy? I wonder if the hash changes resolve #1957? Do we now get unique hashes for IL stubs? There are a number of places already where we call |
Yes, IL Stubs are uniquely identified with the new methodhash |
I ran into an assert with edge weights when doing IBC training and optimization using a checked build. |
@AndyAyersMS if you really want I can checked these items in separately. |
edge = fgGetPredForBlock(bUpdated->bbNext, bUpdated); | ||
newMaxWeight = bUpdated->bbWeight; | ||
newMinWeight = min(edge->edgeWeightMin(), newMaxWeight); | ||
edge->setEdgeWeights(newMinWeight, newMaxWeight); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These assignments of flEdgeWeightMax could violate the requirements that min-weight <= maxWeight
I think it's a good practice not to mix unrelated (or seemingly unrelated) changes in one PR, but I'm not going to ask you to split this one up, as the rest of the changes are diagnostic. We don't have a good mechanism for creating repros or regression tests for IBC related bugs. Seems like we ought to figure out how to do this. |
I agree that we should have a better way to create regression repros in this area. |
@BruceForstall @jashook @dotnet/jit-contrib PTAL This is ready for checkin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There's no need for a wrapper unless the wrapper does additional work. In many cases, we use wrappers so the altjit case can do something different. |