Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

http: support tcmalloc heap profiler and growth profiler #225

Merged
merged 7 commits into from
Mar 8, 2019

Conversation

neverchanje
Copy link
Contributor

Most of the codes are copied from brpc, and formatted according to our code style.

@neverchanje neverchanje added the type/enhancement Indicates new feature requests label Mar 1, 2019
@neverchanje neverchanje self-assigned this Mar 1, 2019
{
MallocExtension *malloc_ext = MallocExtension::instance();
ddebug("received requests for growth profile");
malloc_ext->GetHeapGrowthStacks(&resp.body);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么不直接 MallocExtension::instance()->GetHeapGrowthStacks(&resp.body) 呢?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

按照原来 brpc 的写法,他觉得 MallocExtension::instance() 可能会返回 null,所以就获取这个变量 check null 一下,但是 tcmalloc 函数注释里写了永远不会返回 null,我这里就没有 check。那为了与原来代码保持一致我就没再改动。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.11.5 type/enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants