Supporting Changes for Patchable JProfiling - #24488
Draft
r30shah wants to merge 5 commits into
Draft
Conversation
Changes in this commit adds TR_JProfBlockFrequencyCounterSites for Patching BlockFrequencyInfo is patching of JProfiling is enabled. Counters emitted for the block frequency info in low opt compilations through JProfiling would need to be patched to turn-off data collection and potentially turn-on. TR_JProfBlockFrequencyCounterSites to facilitate back and forth patching. Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
This commit adds JProfValueSites that contains the information about the instruction and location pair that controls execution of the Value Profiling using JProfiling. This assumption can be used to turn-off or turn-on profiling. Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
Add following two lists in the CodeGenerator class to hold the instructions related to JProfiling. 1. _jProfilingCounterBumpInstructionList - List of instructions in this method, that increments the counter inserted for computing frequency using JProfilingBlock. 2. _jProfilingValueProfilingBranchInstructions - List of branch instructions in this method, that control execution of the value profiling code. This list can be used when creating runtime assumption for the method to enable patching of the Profiling code to turn-off profiling data collection. Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
Update the persistent BlockFrequencyInfo and ValueProfileInfo for the method to hold the runtime assumption TR_JProfBlockFrequencyCounterSites and TR_JProfValueSites respectively. This assumption contains the information about the profiling code in the compiled method and facilitates patching to turn-on or off profiling. Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
Introduce a new JProfilingPatchSitesInitPhase that performs following tasks. 1. Construct TR_JProfBlockFrequencyCounterSites that holds information about the location in the compiled code that increments the Block Frequency counters. 2. Construct TR_JProfValueSites that holds information about the location in the compiled code that guards Value Profiling code. This phase is performed at the end after binary encoding and relocation has been run so that assumption list has precise information about the code that can be patched. Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds following three changes.