{"id":27948402,"url":"https://github.com/younghakim7/profiling_code_in_rust","last_synced_at":"2025-06-23T13:36:32.129Z","repository":{"id":291438025,"uuid":"977620785","full_name":"YoungHaKim7/Profiling_code_in_Rust","owner":"YoungHaKim7","description":"When optimizing a program, you also need a way to determine which parts of the program are “hot” (executed frequently enough to affect runtime) and worth modifying. This is best done via profiling","archived":false,"fork":false,"pushed_at":"2025-05-24T12:48:45.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-24T13:52:42.252Z","etag":null,"topics":["dhat","rust"],"latest_commit_sha":null,"homepage":"https://nnethercote.github.io/perf-book/profiling.html","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YoungHaKim7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-04T16:11:11.000Z","updated_at":"2025-05-24T12:48:48.000Z","dependencies_parsed_at":"2025-05-26T11:01:05.761Z","dependency_job_id":null,"html_url":"https://github.com/YoungHaKim7/Profiling_code_in_Rust","commit_stats":null,"previous_names":["younghakim7/profiling_code_in_rust"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YoungHaKim7/Profiling_code_in_Rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoungHaKim7%2FProfiling_code_in_Rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoungHaKim7%2FProfiling_code_in_Rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoungHaKim7%2FProfiling_code_in_Rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoungHaKim7%2FProfiling_code_in_Rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YoungHaKim7","download_url":"https://codeload.github.com/YoungHaKim7/Profiling_code_in_Rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoungHaKim7%2FProfiling_code_in_Rust/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261487490,"owners_count":23166097,"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":["dhat","rust"],"created_at":"2025-05-07T14:58:13.847Z","updated_at":"2025-06-23T13:36:27.118Z","avatar_url":"https://github.com/YoungHaKim7.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Profiling_code_in_Rust\n- https://github.com/flamegraph-rs/flamegraph\n\n- Install it, and run\n\n```bash\n# Rust projects\ncargo flamegraph\n\n# Arbitrary binaries\nflamegraph -- /path/to/binary\n```\n\n# How to interpret a flamegraph? \n- https://www.reddit.com/r/rust/comments/wf9mbn/how_to_interpret_a_flamegraph/?rdt=61382\n\n# C++로 만든 hotspot \nhttps://github.com/KDAB/hotspot\n\n\u003chr /\u003e\n\n\n# (221220)Profiling Code in Rust - by Vitaly Bragilevsky - Rust Linz, December 2022 | Rust\n- https://youtu.be/JRMOIE_wAFk?si=Ngl2T0FWl74H8v_5\n  - 동영상내용 github 코드(https://github.com/bravit/generate_parentheses)\n\n# Rust Profiling 도구 종류\n- https://nnethercote.github.io/perf-book/profiling.html\n\n|||\n|-|-|\n|perf||\n|gprof||\n|callgrind / \u003cbr\u003ecachegrind||\n|DTrace||\n|Other||\n\n# Profilers(Rust)\n- https://nnethercote.github.io/perf-book/profiling.html\n  - There are many different profilers available, each with their strengths and weaknesses. The following is an incomplete list of profilers that have been used successfully on Rust programs.\n\n\u003cli\u003e\u003ca href=\"https://perf.wiki.kernel.org/index.php/Main_Page\"\u003eperf\u003c/a\u003e is a general-purpose profiler that uses hardware performance counters.\n\u003ca href=\"https://github.com/KDAB/hotspot\"\u003eHotspot\u003c/a\u003e and \u003ca href=\"https://profiler.firefox.com/\"\u003eFirefox Profiler\u003c/a\u003e are good for viewing data recorded by perf.\nIt works on Linux.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://developer.apple.com/forums/tags/instruments\"\u003eInstruments\u003c/a\u003e is a general-purpose profiler that comes with Xcode on macOS.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler.html\"\u003eIntel VTune Profiler\u003c/a\u003e is a general-purpose profiler. It works on Windows,\nLinux, and macOS.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://developer.amd.com/amd-uprof/\"\u003eAMD μProf\u003c/a\u003e is a general-purpose profiler. It works on Windows and Linux.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/mstange/samply/\"\u003esamply\u003c/a\u003e is a sampling profiler that produces profiles that can be viewed\nin the Firefox Profiler. It works on Mac and Linux.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/flamegraph-rs/flamegraph\"\u003eflamegraph\u003c/a\u003e is a Cargo command that uses perf/DTrace to profile your\ncode and then displays the results in a flame graph. It works on Linux and\nall platforms that support DTrace (macOS, FreeBSD, NetBSD, and possibly\nWindows).\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.valgrind.org/docs/manual/cg-manual.html\"\u003eCachegrind\u003c/a\u003e \u0026amp; \u003ca href=\"https://www.valgrind.org/docs/manual/cl-manual.html\"\u003eCallgrind\u003c/a\u003e give global, per-function, and per-source-line\ninstruction counts and simulated cache and branch prediction data. They work\non Linux and some other Unixes.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.valgrind.org/docs/manual/dh-manual.html\"\u003eDHAT\u003c/a\u003e is good for finding which parts of the code are causing a lot of\nallocations, and for giving insight into peak memory usage. It can also be\nused to identify hot calls to \u003ccode class=\"hljs\"\u003ememcpy\u003c/code\u003e. It works on Linux and some other\nUnixes. \u003ca href=\"https://github.com/nnethercote/dhat-rs/\"\u003edhat-rs\u003c/a\u003e is an experimental alternative that is a little less\npowerful and requires minor changes to your Rust program, but works on all\nplatforms.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/KDE/heaptrack\"\u003eheaptrack\u003c/a\u003e and \u003ca href=\"https://github.com/koute/bytehound\"\u003ebytehound\u003c/a\u003e are heap profiling tools. They work on Linux.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/nnethercote/counts/\"\u003e\u003ccode class=\"hljs\"\u003ecounts\u003c/code\u003e\u003c/a\u003e supports ad hoc profiling, which combines the use of \u003ccode class=\"hljs\"\u003eeprintln!\u003c/code\u003e\nstatement with frequency-based post-processing, which is good for getting\ndomain-specific insights into parts of your code. It works on all platforms.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/plasma-umass/coz\"\u003eCoz\u003c/a\u003e performs \u003cem\u003ecausal profiling\u003c/em\u003e to measure optimization potential, and has\nRust support via \u003ca href=\"https://github.com/plasma-umass/coz/tree/master/rust\"\u003ecoz-rs\u003c/a\u003e. It works on Linux.\u003c/li\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyounghakim7%2Fprofiling_code_in_rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyounghakim7%2Fprofiling_code_in_rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyounghakim7%2Fprofiling_code_in_rust/lists"}