{"id":13511548,"url":"https://github.com/gperftools/gperftools","last_synced_at":"2025-04-23T20:51:23.231Z","repository":{"id":13616511,"uuid":"16309670","full_name":"gperftools/gperftools","owner":"gperftools","description":"Main gperftools repository","archived":false,"fork":false,"pushed_at":"2024-05-22T17:41:08.000Z","size":6004,"stargazers_count":8209,"open_issues_count":123,"forks_count":1479,"subscribers_count":364,"default_branch":"master","last_synced_at":"2024-05-22T18:13:15.531Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gperftools.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog.old","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-01-28T11:15:07.000Z","updated_at":"2024-05-30T01:10:06.887Z","dependencies_parsed_at":"2023-12-03T01:23:44.500Z","dependency_job_id":"269d7134-4888-4c14-bfcb-ab8fb1ef0065","html_url":"https://github.com/gperftools/gperftools","commit_stats":{"total_commits":741,"total_committers":112,"mean_commits":6.616071428571429,"dds":0.7246963562753037,"last_synced_commit":"bf8b714bf5075d0a6f2f28504b43095e2b1e11c5"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperftools%2Fgperftools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperftools%2Fgperftools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperftools%2Fgperftools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperftools%2Fgperftools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gperftools","download_url":"https://codeload.github.com/gperftools/gperftools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250514755,"owners_count":21443208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T03:00:55.224Z","updated_at":"2025-04-23T20:51:23.198Z","avatar_url":"https://github.com/gperftools.png","language":"C++","readme":"gperftools\n----------\n(originally Google Performance Tools)\n\nOVERVIEW\n---------\n\ngperftools is a collection of a high-performance multi-threaded\nmalloc() implementation, plus some pretty nifty performance analysis\ntools.\n\ngperftools is distributed under the terms of the BSD License. Join our\nmailing list at gperftools@googlegroups.com for updates:\nhttps://groups.google.com/forum/#!forum/gperftools\n\ngperftools was original home for pprof program. The original pprof was\na Perl script and there is not that many Perl experts\nnowadays. Thankfully, pprof has been rewritten in Go around 2016 and\nthat version of pprof has gotten a lot more feature-ful. So the\noriginal pprof is now removed in favor of Go version at\nhttps://github.com/google/pprof. Go's own profiling facilities are\nbased on that pprof version as well.\n\n\nTCMALLOC\n--------\nJust link in -ltcmalloc or -ltcmalloc_minimal to get the advantages of\ntcmalloc -- a replacement for malloc and new.  See below for some\nenvironment variables you can use with tcmalloc, as well.\n\ntcmalloc functionality is available on all systems we've tested; see\nINSTALL for more details.  See README_windows.txt for instructions on\nusing tcmalloc on Windows.\n\n\nHEAP PROFILER\n-------------\nSee docs/heapprofile.adoc for information about how to use tcmalloc's\nheap profiler and analyze its output.\n\nAs a quick-start, do the following after installing this package:\n\n1) Link your executable with -ltcmalloc\n2) Run your executable with the HEAPPROFILE environment var set:\n     $ HEAPPROFILE=/tmp/heapprof \u003cpath/to/binary\u003e [binary args]\n3) Run pprof to analyze the heap usage\n     $ pprof \u003cpath/to/binary\u003e /tmp/heapprof.0045.heap  # run 'ls' to see options\n     $ pprof --gv \u003cpath/to/binary\u003e /tmp/heapprof.0045.heap\n\nYou can also use LD_PRELOAD to heap-profile an executable that you\ndidn't compile.\n\nThere are other environment variables, besides HEAPPROFILE, you can\nset to adjust the heap-profiler behavior; c.f. \"ENVIRONMENT VARIABLES\"\nbelow.\n\nThe heap profiler is available on all unix-based systems we've tested;\nsee INSTALL for more details.  It is not currently available on Windows.\n\n\nCPU PROFILER\n------------\nSee docs/cpuprofile.adoc for information about how to use the CPU\nprofiler and analyze its output.\n\nAs a quick-start, do the following after installing this package:\n\n1) Link your executable with -lprofiler\n2) Run your executable with the CPUPROFILE environment var set:\n     $ CPUPROFILE=/tmp/prof.out \u003cpath/to/binary\u003e [binary args]\n3) Run pprof to analyze the CPU usage\n     $ pprof \u003cpath/to/binary\u003e /tmp/prof.out      # -pg-like text output\n     $ pprof --gv \u003cpath/to/binary\u003e /tmp/prof.out # really cool graphical output\n\nThere are other environment variables, besides CPUPROFILE, you can set\nto adjust the cpu-profiler behavior; cf \"ENVIRONMENT VARIABLES\" below.\n\nThe CPU profiler is available on all unix-based systems we've tested;\nsee INSTALL for more details.  It is not currently available on Windows.\n\nNOTE: CPU profiling doesn't work after fork (unless you immediately\n      do an exec()-like call afterwards).  Furthermore, if you do\n      fork, and the child calls exit(), it may corrupt the profile\n      data.  You can use _exit() to work around this.  We hope to have\n      a fix for both problems in the next release of perftools\n      (hopefully perftools 1.2).\n\n\nCONFIGURATION OPTIONS\n---------------------\nFor advanced users, there are several flags you can pass to\n'./configure' that tweak tcmalloc performance.  (These are in addition\nto the environment variables you can set at runtime to affect\ntcmalloc, described below.)  See the INSTALL file for details.\n\n\nENVIRONMENT VARIABLES\n---------------------\nThe cpu profiler, heap checker, and heap profiler will lie dormant,\nusing no memory or CPU, until you turn them on.  (Thus, there's no\nharm in linking -lprofiler into every application, and also -ltcmalloc\nassuming you're ok using the non-libc malloc library.)\n\nThe easiest way to turn them on is by setting the appropriate\nenvironment variables.  We have several variables that let you\nenable/disable features as well as tweak parameters.\n\nHere are some of the most important variables:\n\nHEAPPROFILE=\u003cpre\u003e -- turns on heap profiling and dumps data using this prefix\nHEAPCHECK=\u003ctype\u003e  -- turns on heap checking with strictness 'type'\nCPUPROFILE=\u003cfile\u003e -- turns on cpu profiling and dumps data to this file.\nPROFILESELECTED=1 -- if set, cpu-profiler will only profile regions of code\n                     surrounded with ProfilerEnable()/ProfilerDisable().\nCPUPROFILE_FREQUENCY=x-- how many interrupts/second the cpu-profiler samples.\n\nPERFTOOLS_VERBOSE=\u003clevel\u003e -- the higher level, the more messages malloc emits\nMALLOCSTATS=\u003clevel\u003e    -- prints memory-use stats at program-exit\n\nFor a full list of variables, see the documentation pages:\n   docs/cpuprofile.adoc\n   docs/heapprofile.adoc\n\nSee also TCMALLOC_STACKTRACE_METHOD_VERBOSE and\nTCMALLOC_STACKTRACE_METHOD environment variables briefly documented in\nour INSTALL file and on our wiki page at:\nhttps://github.com/gperftools/gperftools/wiki/gperftools'-stacktrace-capturing-methods-and-their-issues\n\n\nCOMPILING ON NON-LINUX SYSTEMS\n------------------------------\n\nPerftools was developed and tested on x86, aarch64 and riscv Linux\nsystems, and it works in its full generality only on those systems.\n\nHowever, we've successfully ported much of the tcmalloc library to\nFreeBSD, Solaris x86 (not tested recently though), and Mac OS X\n(aarch64; x86 and ppc have not been tested recently); and we've ported\nthe basic functionality in tcmalloc_minimal to Windows.  See INSTALL\nfor details.  See README_windows.txt for details on the Windows port.\n\n\n---\nOriginally written: 17 May 2011\nLast refreshed: 10 Aug 2023\n","funding_links":[],"categories":["Repositories","C++","Profiling","\u003ca name=\"cpp\"\u003e\u003c/a\u003eC++","Containers \u0026 Language Extentions \u0026 Linting","Language-Specific Tools","Tools","剖析","Utilities ##","C/C++生态圈Dev\u0026Ops工具与服务","General utilites"],"sub_categories":["Advanced books","For C++/C","C/C++","Memory \u0026 Performance Tools","高级书籍","Vim ###","Free"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgperftools%2Fgperftools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgperftools%2Fgperftools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgperftools%2Fgperftools/lists"}