Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support jemalloc profiler #2737

Merged
merged 17 commits into from
Sep 23, 2024
Merged
2 changes: 2 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ LINKOPTS = [
"-Wl,-U,_ProfilerStop",
"-Wl,-U,__Z13GetStackTracePPvii",
"-Wl,-U,_RegisterThriftProtocol",
"-Wl,-U,_mallctl",
"-Wl,-U,_malloc_stats_print",
],
"//conditions:default": [
"-lrt",
Expand Down
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,10 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

# for *.so
Expand Down
2 changes: 2 additions & 0 deletions config_brpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ if [ "$SYSTEM" = "Darwin" ]; then
DYNAMIC_LINKINGS="$DYNAMIC_LINKINGS -Wl,-U,_ProfilerStop"
DYNAMIC_LINKINGS="$DYNAMIC_LINKINGS -Wl,-U,__Z13GetStackTracePPvii"
DYNAMIC_LINKINGS="$DYNAMIC_LINKINGS -Wl,-U,_RegisterThriftProtocol"
DYNAMIC_LINKINGS="$DYNAMIC_LINKINGS -Wl,-U,_mallctl"
DYNAMIC_LINKINGS="$DYNAMIC_LINKINGS -Wl,-U,_malloc_stats_print"
fi
append_linking() {
if [ -f $1/lib${2}.a ]; then
Expand Down
58 changes: 58 additions & 0 deletions docs/cn/heap_profiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,61 @@ brpc还提供一个类似的growth profiler分析内存的分配去向(不考

1. 安装[standalone pprof](https://github.com/google/pprof),并把下载的pprof二进制文件路径写入环境变量GOOGLE_PPROF_BINARY_PATH中
2. 安装llvm-symbolizer(将函数符号转化为函数名),直接用brew安装即可:`brew install llvm`

# Jemalloc Heap Profiler

## 开启方法

1. 编译[jemalloc](https://github.com/jemalloc/jemalloc)时需--enable-prof以支持profiler, 安装完成后bin目录下会有jeprof文件。
2. 启动进程前最好配置env `JEPROF_FILE=/xxx/jeprof`,否则进程默认用$PATH里的jeprof解析。
3. 进程开启profiler:
- 启动进程并开启profiler功能:`MALLOC_CONF="prof:true" LD_PRELOAD=/xxx/lib/libjemalloc.so ./bin/test_server`,MALLOC_CONF是env项,prof:true只做一些初始化动作,并不会采样,但[prof_active](https://jemalloc.net/jemalloc.3.html#opt.prof_active)默认是true,所以进程启动就会采样。
- 若静态链接jemalloc:`MALLOC_CONF="prof:true" ./bin/test_server`。
- 或通过下面的gflags控制,gflags不会反应MALLOC_CONF值。
4. 相关gflags说明:
- FLAGS_je_prof_active:true:开启采样,false:关闭采样。
- FLAGS_je_prof_dump:修改值会生成heap文件,用于手动操作jeprof分析。
- FLAGS_je_prof_reset:清理已采样数据和重置profiler选项,并且动态设置采样率,[默认](https://jemalloc.net/jemalloc.3.html#opt.lg_prof_sample)2^19B(512K),对性能影响可忽略。
5. 若要做memory leak:
- `MALLOC_CONF="prof:true,prof_leak:true,prof_final:true" LD_PRELOAD=/xxx/lib/libjemalloc.so ./bin/test_server` ,进程退出时生成heap文件。
- 注:可`kill pid`优雅退出,不可`kill -9 pid`;可用`FLAGS_graceful_quit_on_sigterm=true FLAGS_graceful_quit_on_sighup=true`来支持优雅退出。

注:
- 每次dump的都是从采样至今的所有数据,若触发了reset,接来下dump的是从reset至今的所有数据,方便做diff。
- 更多jemalloc profiler选项请参考[官网](https://jemalloc.net/jemalloc.3.html),如`prof_leak_error:true`则检测到内存泄漏,进程立即退出。

## 样例

- jeprof命令`jeprof ip:port/pprof/heap`。

![img](../images/cmd_jeprof_text.png)

- curl生成text格式`curl ip:port/pprof/heap?display=text`。

![img](../images/curl_jeprof_text.png)

- curl生成svg图片格式`curl ip:port/pprof/heap?display=svg`。

![img](../images/curl_jeprof_svg.png)

- curl生成火焰图`curl ip:port/pprof/heap?display=flamegraph`。需配置env FLAMEGRAPH_PL_PATH=/xxx/flamegraph.pl,[flamegraph](https://github.com/brendangregg/FlameGraph)

![img](../images/curl_jeprof_flamegraph.png)

- curl获取内存统计信息`curl ip:port/pprof/heap?display=stats&opts=Ja`或`curl ip:port/memory?opts=Ja`,更多opts请参考[opts](https://github.com/jemalloc/jemalloc/blob/dev/include/jemalloc/internal/stats.h#L9)。

![img](../images/je_stats_print.png)

- 内存使用量可关注:
1. jemalloc.stats下的
- [resident](https://jemalloc.net/jemalloc.3.html#stats.resident)
- [metadata](https://jemalloc.net/jemalloc.3.html#stats.metadata)
- [allocated](https://jemalloc.net/jemalloc.3.html#stats.allocated):jeprof分析的就是这部分内存。
- [active](https://jemalloc.net/jemalloc.3.html#stats.active):active - allocated ≈ unuse。
2. stats.arenas下的:
- [resident](https://jemalloc.net/jemalloc.3.html#stats.arenas.i.resident)
- [pactive](https://jemalloc.net/jemalloc.3.html#stats.arenas.i.pactive)
- [base](https://jemalloc.net/jemalloc.3.html#stats.arenas.i.base):含义近似metadata
- [small.allocated](https://jemalloc.net/jemalloc.3.html#stats.arenas.i.small.allocated)
- [large.allocated](https://jemalloc.net/jemalloc.3.html#stats.arenas.i.large.allocated):arena allocated ≈ small.allocated + large.allocated

Binary file added docs/images/cmd_jeprof_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/curl_jeprof_flamegraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/curl_jeprof_svg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/curl_jeprof_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/je_stats_print.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion example/asynchronous_echo_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(asynchronous_echo_client client.cpp ${PROTO_SRC})
Expand Down
5 changes: 4 additions & 1 deletion example/auto_concurrency_limiter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_RegisterThriftProtocol")
"-Wl,-U,_RegisterThriftProtocol"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(asynchronous_echo_client client.cpp ${PROTO_SRC})
Expand Down
5 changes: 4 additions & 1 deletion example/backup_request_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(backup_request_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/baidu_proxy_and_generic_call/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/bthread_tag_echo_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/cancel_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(cancel_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/cascade_echo_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(cascade_echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/dynamic_partition_echo_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(dynamic_partition_echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/echo_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/grpc_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_RegisterThriftProtocol")
"-Wl,-U,_RegisterThriftProtocol"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(server server.cpp ${PROTO_SRC} ${PROTO_HEADER} )
Expand Down
5 changes: 4 additions & 1 deletion example/http_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(http_client http_client.cpp)
Expand Down
5 changes: 4 additions & 1 deletion example/memcache_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(memcache_client client.cpp)
Expand Down
5 changes: 4 additions & 1 deletion example/multi_threaded_echo_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/multi_threaded_echo_fns_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(multi_threaded_echo_fns_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/nshead_extension_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(nshead_extension_client client.cpp)
Expand Down
5 changes: 4 additions & 1 deletion example/nshead_pb_extension_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(nshead_pb_extension_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/parallel_echo_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(parallel_echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/partition_echo_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/rdma_performance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/redis_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(redis_cli redis_cli.cpp)
Expand Down
5 changes: 4 additions & 1 deletion example/rpcz_echo_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(rpcz_echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/selective_echo_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(selective_echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/session_data_and_thread_local/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(session_data_and_thread_local_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
5 changes: 4 additions & 1 deletion example/streaming_echo_c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
"-Wl,-U,_ProfilerStart"
"-Wl,-U,_ProfilerStop"
"-Wl,-U,__Z13GetStackTracePPvii")
"-Wl,-U,__Z13GetStackTracePPvii"
"-Wl,-U,_mallctl"
"-Wl,-U,_malloc_stats_print"
)
endif()

add_executable(streaming_echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
Expand Down
Loading
Loading