{"id":36875960,"url":"https://github.com/xnslong/guess-stack","last_synced_at":"2026-01-12T15:08:29.692Z","repository":{"id":41970935,"uuid":"466763087","full_name":"xnslong/guess-stack","owner":"xnslong","description":"This is a tool to recover deep stacks whose root are lost, so that they can align with each other again in FlameGraphs.","archived":false,"fork":false,"pushed_at":"2022-12-02T06:17:42.000Z","size":1510,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-19T15:15:56.990Z","etag":null,"topics":["flamegraph","pprof"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xnslong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-06T14:35:23.000Z","updated_at":"2023-10-29T10:29:50.000Z","dependencies_parsed_at":"2023-01-22T12:10:11.341Z","dependency_job_id":null,"html_url":"https://github.com/xnslong/guess-stack","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/xnslong/guess-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xnslong%2Fguess-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xnslong%2Fguess-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xnslong%2Fguess-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xnslong%2Fguess-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xnslong","download_url":"https://codeload.github.com/xnslong/guess-stack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xnslong%2Fguess-stack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["flamegraph","pprof"],"created_at":"2026-01-12T15:08:23.911Z","updated_at":"2026-01-12T15:08:29.687Z","avatar_url":"https://github.com/xnslong.png","language":"Go","readme":"# guess-stack\n\nWhen taking samples of call stacks from a process in flight, some root stack nodes may be lost if the stack is too deep.\nThen the stacks cannot align with each other anymore, it will be hard to analyze.\n\nFor example, following is a FlameGraph whose stacks have their root call nodes lost, it becomes hard to understand.\n\n![mis-aligned version](doc/before.png)\n\nThis tool will try to recover the stacks by guessing the missing stack nodes, enabling the stacks to align with each other again. Following is the recovered version of the previous FlameGraph. Then we can analyze it easily.\n\n![aligned version](doc/after.png)\n\n## How to guess?\n\nSuppose we have 2 stacks in a graph: A \u0026 B. When the root end nodes of a stack A overlaps nodes in stack B,\nthen we guess stack A should have trimmed some root nodes the same as those in stack B under the overlapping nodes\n(shown in the following 'guess' graph).\n\n![guess](doc/guess.png)\n\nThe longer the overlapping part is, the more trustable the guess is. \n\nIf you are interested in the algorithm to realize it, please refer to [algorithm](core/README.md).\n\n\n# Module introduction\n\nSince there are a variety of profile file types, we will provide several tools to fix each profile file type.\n\n* [guess-pprof](guess-pprof/README.md): a tool to fix the golang pprof profile. (taken\n  by [pprof](https://github.com/google/pprof))\n* [guess-fold](guess-fold/README.md): a tool to fix the folded stack type of call stacks defined by [FlameGraph]. it's will be more commonly used for programs written in a variety oflanguages.\n\n[FlameGraph]: https://github.com/brendangregg/FlameGraph\n\nThe previous tools are working based on the following core module.\n\n* [core](core): The core module providing an implementation to fix the missing nodes by guessing. This module will be\n  used by each other modules.\n\n\n# Installation\n\nguess-pprof\n\n```bash\ngo install github.com/xnslong/guess-stack/guess-pprof@latest\n```\n\nguess-fold\n\n```bash\ngo install github.com/xnslong/guess-stack/guess-fold@latest\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxnslong%2Fguess-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxnslong%2Fguess-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxnslong%2Fguess-stack/lists"}