wu-sheng commented on code in PR #12777:
URL: https://github.com/apache/skywalking/pull/12777#discussion_r1845974738


##########
oap-server/server-library/library-async-profiler-jfr-parser/src/main/java/one/jfr/JFRConverter.java:
##########
@@ -0,0 +1,210 @@
+/*
+ * Copyright The async-profiler authors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+package one.jfr;
+
+import one.jfr.event.AllocationSample;
+import one.jfr.event.ContendedLock;
+import one.jfr.event.Event;
+import one.jfr.event.EventAggregator;
+import one.jfr.event.ExecutionSample;
+import one.jfr.event.LiveObject;
+import org.apache.skywalking.oap.server.library.jfr.type.JFREventType;
+import org.apache.skywalking.oap.server.library.jfr.type.Classifier;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.apache.skywalking.oap.server.library.jfr.type.Frame.TYPE_CPP;
+import static 
org.apache.skywalking.oap.server.library.jfr.type.Frame.TYPE_KERNEL;
+import static 
org.apache.skywalking.oap.server.library.jfr.type.Frame.TYPE_NATIVE;
+import static 
org.apache.skywalking.oap.server.library.jfr.type.JFREventType.EXECUTION_SAMPLE;
+import static 
org.apache.skywalking.oap.server.library.jfr.type.JFREventType.LOCK;
+import static 
org.apache.skywalking.oap.server.library.jfr.type.JFREventType.OBJECT_ALLOCATION_IN_NEW_TLAB;
+import static 
org.apache.skywalking.oap.server.library.jfr.type.JFREventType.OBJECT_ALLOCATION_OUTSIDE_TLAB;
+import static 
org.apache.skywalking.oap.server.library.jfr.type.JFREventType.PROFILER_LIVE_OBJECT;
+
+/**
+ * Add collectMultiEvents and getEventAggregator methods to the original code 
to parse and process multiple events at once
+ * <p>
+ * This class is placed in the one.jfr package because some classes and fields 
of the async-profiler-converter package
+ * can only be accessed under the same package name, and what we want to do is 
to expand it, so here we choose to create
+ * a class with the same package name for extension.
+ */

Review Comment:
   ```suggestion
   /**
    * JFRConverter is copied from one.jfr.JfrConverter. Because need to
    * add collectMultiEvents and getEventAggregator methods, to parse 
    * and process multiple events at one time.
    */
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to