Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-03-07 09:52:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
489a492e47fac0eb1f446aa50565e86ab810fb15
489a492e
1 parent
a58489eb
add url for gperftools
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
14 行增加
和
1 行删除
trunk/research/gperftools/cpu-profiler/cpu_profiler.cc
trunk/research/gperftools/heap-checker/heap_checker.cc
trunk/research/gperftools/heap-profiler/heap_profiler.cc
trunk/research/gperftools/cpu-profiler/cpu_profiler.cc
查看文件 @
489a492
...
...
@@ -21,6 +21,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@see: http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
config srs with gperf(to make gperftools):
./configure --with-gperf --jobs=3
set the pprof path if not set:
...
...
trunk/research/gperftools/heap-checker/heap_checker.cc
查看文件 @
489a492
...
...
@@ -21,6 +21,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html
config srs with gperf(to make gperftools):
./configure --with-gperf --jobs=3
set the pprof path if not set:
...
...
@@ -56,8 +57,12 @@ void global_leak() {
global_leak_imp
();
}
bool
loop
=
true
;
void
handler
(
int
sig
)
{
exit
(
0
);
// we must use signal to notice the main thread to exit normally.
if
(
sig
==
SIGINT
)
{
loop
=
false
;
}
}
int
main
(
int
argc
,
char
**
argv
)
{
signal
(
SIGINT
,
handler
);
...
...
@@ -65,10 +70,16 @@ int main(int argc, char** argv) {
global_leak
();
printf
(
"press CTRL+C if you want to abort the program.
\n
"
);
sleep
(
3
);
if
(
!
loop
)
{
return
0
;
}
explicit_leak
();
printf
(
"press CTRL+C if you want to abort the program.
\n
"
);
sleep
(
3
);
if
(
!
loop
)
{
return
0
;
}
return
0
;
}
...
...
trunk/research/gperftools/heap-profiler/heap_profiler.cc
查看文件 @
489a492
...
...
@@ -21,6 +21,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@see: http://google-perftools.googlecode.com/svn/trunk/doc/heapprofile.html
config srs with gperf(to make gperftools):
./configure --with-gperf --jobs=3
set the pprof path if not set:
...
...
请
注册
或
登录
后发表评论