RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v2]

Marcus Hirt hirt at openjdk.java.net
Fri Oct 29 18:54:13 UTC 2021


On Fri, 29 Oct 2021 16:55:43 GMT, Jean-Philippe Bempel <jpbempel at openjdk.org> wrote:

>> Add extension methods when constants are read, referenced, resolved
>> and constant pools fully resolved to be able for example:
>> 
>>  * track constant pool usage inside events
>>  * replace or translate symbols, method names, etc... like
>> de-obfuscations of stack traces
>
> Jean-Philippe Bempel has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.

core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/parser/IParserExtension.java line 78:

> 76: 	 * @return an instance implementing IConstantPoolExtension
> 77: 	 */
> 78: 	default IConstantPoolExtension createConstantPoolExtension() {

Perhaps we might as well make the other methods default too?

		default String getValueInterpretation(String eventTypeId, String fieldId) {
			return null;
		}
		default IEventSinkFactory getEventSinkFactory(IEventSinkFactory subFactory) {
			return subFactory;
		}

-------------

PR: https://git.openjdk.java.net/jmc/pull/333


More information about the jmc-dev mailing list