This is an automated email from the ASF dual-hosted git repository.

wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new fb2c824  Update cpu profiler doc
     new 683585a  Merge pull request #1646 from wwbmmm/update_cpu_profiler_doc
fb2c824 is described below

commit fb2c8247fc62aedd0b4dc15db1b9907621c3aa4e
Author: wwbmmm <[email protected]>
AuthorDate: Mon Dec 20 17:15:39 2021 +0800

    Update cpu profiler doc
---
 docs/cn/cpu_profiler.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/cn/cpu_profiler.md b/docs/cn/cpu_profiler.md
index fadf0b9..5dfa396 100644
--- a/docs/cn/cpu_profiler.md
+++ b/docs/cn/cpu_profiler.md
@@ -5,7 +5,7 @@ brpc可以分析程序中的热点函数。
 1. 链接`libtcmalloc_and_profiler.a`
    1. 这么写也开启了tcmalloc,不建议单独链接cpu 
profiler而不链接tcmalloc,可能越界访问导致[crash](https://github.com/gperftools/gperftools/blob/master/README#L226).可能由于tcmalloc不及时归还内存,越界访问不会crash。
    2. 如果tcmalloc使用frame 
pointer而不是libunwind回溯栈,请确保在CXXFLAGS或CFLAGS中加上`-fno-omit-frame-pointer`,否则函数间的调用关系会丢失,最后产生的图片中都是彼此独立的函数方框。
-2. 定义宏BRPC_ENABLE_CPU_PROFILER, 一般加入编译参数-DBRPC_ENABLE_CPU_PROFILER。
+2. 定义宏BRPC_ENABLE_CPU_PROFILER, 
一般加入编译参数-DBRPC_ENABLE_CPU_PROFILER。注意:BRPC_ENABLE_CPU_PROFILER宏需要定义在引用到brpc头文件(channel.h或server.h)的代码里。比如A模块引用B模块,B模块在实现中引用brpc头文件,必须在B模块的编译参数加上BRPC_ENABLE_CPU_PROFILER宏,在A模块加是没用的。
 3. 如果只是brpc client或没有使用brpc,看[这里](dummy_server.md)。 
 
  注意要关闭Server端的认证,否则可能会看到这个:

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

Reply via email to