PHILO-HE commented on code in PR #9759:
URL: https://github.com/apache/incubator-gluten/pull/9759#discussion_r2110755291


##########
shims/common/src/main/scala/org/apache/gluten/config/GlutenConfig.scala:
##########
@@ -1738,4 +1738,11 @@ object GlutenConfig {
       .doc("Enable or disable columnar collectTail.")
       .booleanConf
       .createWithDefault(true)
+
+  val MEMORY_DUMP_ON_EXIT =
+    buildConf("spark.gluten.monitor.memoryDumpOnExit")
+      .doc("Whether to trigger native memory dump when executor exits.")
+      .booleanConf
+      .createWithDefault(false)

Review Comment:
   Can we move this config into VeloxConfig.scala? It's just applicable to 
Velox backend. Please also document that to enable this feature, it also 
requires --enable_jemalloc_stats is set to ON when building Gluten native code.



##########
backends-velox/src/main/java/org/apache/gluten/monitor/VeloxMemoryProfiler.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.gluten.monitor;
+
+public class VeloxMemoryProfiler {
+
+  /** Starts the Velox memory profiler. + jemalloc: prof.active=ture */
+  public static native void start();
+
+  /** Dumps the current memory profile. + jemalloc: prof.dump */
+  public static native void dump();
+
+  /** Stops the Velox memory profiler. + jemalloc: prof.active=false */
+  public static native void stop();

Review Comment:
   Seems start & stop are not called. Am I missing something? 



##########
backends-velox/src/main/java/org/apache/gluten/monitor/VeloxMemoryProfiler.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.gluten.monitor;
+
+public class VeloxMemoryProfiler {
+
+  /** Starts the Velox memory profiler. + jemalloc: prof.active=ture */

Review Comment:
   Nit: "+" can be removed from comments if no reason to use it.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to