frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y ago
I'd like to do some statistics over the machine code gcc generates, such as a histogram of used instructions, average volatile/preserved registers usage of functions etc. For now just x86_64 SysV-ABI would be enough.

However I'm not aware of any pre-existing tool that lets me easily do this. The options I currently see are either make gcc output assembly and write a parser for the GNU Assembler format (possibly by reusing the asm-parser of the compiler-explorer project), or write a tool that reads (disassembles) object files directly using elfutils.

Any hints, prior work, further ideas, links to useful resources, or any other kind of help would be much appreciated.

Comments

baobun•1y ago
"Static analysis" should be a relevant search term. Assuming you don't need to tie the instructions back to C code then the "gcc" part seems circumstancial for implementation? I guess you might want to parse the ASM into an Abstract Syntax Tree (AST) represenation and work on that?

If you do want to tie it back to the source, this looks relevant: http://icps.u-strasbg.fr/~pop/gcc-ast.html

phafu•1y ago
For my purpose I don't need to get back to the original source, no.

The gcc part is only relevant with regards to what dialect of assembler I need to parse. If I go that route, I'd write a parser for the GNU assembler, and that would of course work with any code in that dialect, regardless from which compiler it came from (I haven't checked whether other compilers can produce GNU assembler though).

GPU telemetry anomaly: 146W idle draw on A100 (white paper)

https://github.com/mikebains41-debug/ai-gpu-energy-optimizer-/blob/main/WHITEPAPER.md
1•mikebains•50s ago•0 comments

Who Wins the Future: Chips vs. Frontier LLMs

https://medium.com/@vektormemory/who-wins-the-future-chips-vs-frontier-llms-1e8e0ca42641
1•vektormemory•2m ago•0 comments

The Richest Cat in the World

https://www.theatlantic.com/magazine/2026/06/karl-lagerfeld-cat-heir-choupette/686940/
1•gmays•3m ago•0 comments

Energy Efficiency

https://ai-gpu-brain-v3.onrender.com/metrics
2•mikebains•3m ago•0 comments

Anthropic hires OpenAI cofounder Andrej Karpathy

https://www.cnbc.com/2026/05/19/anthropic-hires-openai-cofounder-andrej-karpathy-former-tesla-ai-...
1•doppp•6m ago•0 comments

CVE-2025-54518

https://nvd.nist.gov/vuln/detail/cve-2025-54518
1•losfair•8m ago•0 comments

Key, in sight [Creative uses of keyboard shortcuts and macros]

https://aresluna.org/key-in-sight/
1•anotherevan•12m ago•1 comments

Show HN: Building a Programming Language for Myself

https://blog.aawadia.dev/2026/05/19/teak-lang/
1•asadawadia•13m ago•0 comments

20 Year old pgcrypto CVE reported

https://thebuild.com/blog/2026/05/15/two-decades-two-rces-what-pgcrypto-has-been-doing-since-2005/
1•sameers•15m ago•1 comments

Coding is solved? Software is not

https://arcplane.ai/journal/software-is-not-solved
2•splash123•15m ago•0 comments

Greg Hyman, Co-Creator of Tickle Me Elmo, Dies at 78

https://www.nytimes.com/2026/05/19/business/greg-hyman-dead.html
1•bookofjoe•20m ago•1 comments

Google Scholar names its most influential papers for 2025

https://www.nature.com/nature-index/news/google-scholar-reveals-most-influential-research-papers-...
1•teleforce•20m ago•0 comments

Japan is gripped by mass allergies. A 1950s project is to blame

https://www.bbc.com/future/article/20260515-the-1950s-blunder-which-causes-mass-hay-fever-in-japan
2•ranit•22m ago•0 comments

Ask HN: Should I learn to code in 2026?

3•vrinda13•23m ago•1 comments

Thioacetone (Wiki)

https://en.wikipedia.org/wiki/Thioacetone
1•sans_souse•25m ago•0 comments

XINF MCP Server

https://xinf.dev/mcp
2•ZeroTerabytes•30m ago•2 comments

Canonical launches Ubuntu Core 26

https://canonical.com/blog/canonical-launches-ubuntu-core-26
2•LopRabbit•30m ago•0 comments

Ben Welsh made an index of all FiveThirtyEight articles on the Internet Archive

https://fivethirtyeightindex.com/
1•ChocMontePy•31m ago•1 comments

'We don't see a robot as a threat: simply another form of presence in the world'

https://english.elpais.com/science-tech/2026-05-16/takeshi-yoro-anatomist-in-japan-we-dont-see-a-...
1•Geekette•33m ago•0 comments

Sci/acc: what happens to science after super-intelligence?

https://willzeng.com/shared/sciacc.html
1•wzeng•35m ago•1 comments

Ubuntu Core 26 targets IoT, offers up to 15 years of security maintenance

https://www.cnx-software.com/2026/05/19/ubuntu-core-26-targets-iot-devices-and-embedded-systems-o...
2•0in•39m ago•0 comments

On Guard! The Story of SAGE [IBM, 1956]

https://www.youtube.com/watch?v=lFGco9ZsFGE
1•doctaj•42m ago•1 comments

Optimize_anything: A Universal API for Optimizing Any Text Parameter

https://arxiv.org/abs/2605.19633
4•LakshyAAAgrawal•45m ago•1 comments

Google accused of pushing 'free for life' G Suite users onto paid plans

https://www.theregister.com/applications/2026/05/19/google-accused-of-pushing-free-for-life-g-sui...
6•0in•46m ago•0 comments

Chairman and Commssioners – CFTC

https://www.cftc.gov/About/Commissioners/index.htm
1•seliopou•54m ago•0 comments

Towards Identifying the Economics and Efficiency of Fuzzers vs. Agents

https://dangerouserrors.com/posts/2026-04-06-towards-identifying-the-economics-of-fuzzers-vs-agents/
2•mooreds•1h ago•0 comments

Writing clear docs when you naturally think in code

https://www.knowledgeowl.com/blog/posts/writing-docs-when-you-think-in-code
1•eigenBasis•1h ago•1 comments

Cavity quantum electrodynamics control of quantum Hall stripes

https://www.nature.com/articles/s41567-026-03287-3
2•bookofjoe•1h ago•0 comments

US Justice Department 'forever' bars IRS from auditing Trump's past tax returns

https://www.theguardian.com/us-news/2026/may/19/trump-irs-settlement-tax-returns
8•embedding-shape•1h ago•1 comments

Poor grip strength linked to greater odds of developing depression

https://medicalxpress.com/news/2026-05-early-poor-strength-linked-greater.html
1•Gaishan•1h ago•0 comments