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


##########
backends-velox/src/main/java/org/apache/gluten/monitor/VeloxMemoryProfiler.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * 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;
+
+/**
+ * VeloxMemoryProfiler is a JNI for controlling native memory profiler. 
Currently, it uses jemalloc
+ * for memory profiling, so if you want to enable it, need to build gluten with
+ * `--enable_jemalloc_stats=ON`.
+ *
+ * <p>Gluten does not include jemalloc, so we need to set the following 
configurations to load
+ * jemalloc and enable profiling:

Review Comment:
   @FelixYBW, in Gluten's latest code, if enable_jemalloc_stats=ON,  Gluten 
native lib is dynamically linked with jemalloc. Thus, the jemalloc stats can 
reflect the memory allocation by jemalloc in overall replacement (LD_PRELOAD 
the same shared jemalloc lib) for standard memory allocation.
   
   We only recommend to use static link if jemalloc is explicitly used in 
certain places in the project, not overall replacement (including dependency 
libs).



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