zoukankan      html  css  js  c++  java
  • 开发工具 内存,性能检测工具

    Valgrind下载与安装

    1、下载:

    valgrind官网:http://valgrind.org下载

    2、安装

    cd valgrind
    
     ./autogen.sh
    
    ./configure --prefix=...
    
    make
    
    make install

    3、执行

    /opt/soft/valgrind/bin/valgrind --tool=memcheck --leak-check=full --log-file=./2log.txt ./test [程序参数]

    gperftools下载与安装 

    1、下载及安装libunwind
    下载地址: http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz

    安装:

    ./configure --prefix=/home/your_name/tools/libunwind/ CFLAGS=-U_FORTRIFY_SOURCE
    make
    make install 

    2、下载及安装gperftools
    git地址:https://github.com/gperftools/gperftools
    安装:

    ./configure --prefix=/home/your_name/tools/gperftools LDFLAGS=-L/home/your_name/tools/libunwind/lib 
    CPPFLAGS=-I/home/your_name/tools/libunwind/include make make install

    3、执行

    //性能检测
    env LD_PRELOAD="/opt/soft/gperft/lib/libprofiler.so" CPUPROFILE_FREQUENCY=100 CPUPROFILE=cpu_perf.prof ./test
    
    /opt/soft/gperft/bin/pprof --text ./test cpu_perf.prof > cpu_perf.text
  • 相关阅读:
    微信小程序开发入门(二)
    微信小程序开发入门(一)
    django入门与实践(续)
    django入门与实践(开)
    Python六剑客
    python入门(二十讲):爬虫
    python入门(十九讲):多进程
    ES6箭头函数
    ES6
    数据库常用命令
  • 原文地址:https://www.cnblogs.com/zhanggaofeng/p/10889310.html
Copyright © 2011-2022 走看看