frontpage.
newsnewestaskshowjobs

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).

Benchmark object storage in objects/s, not GB/s

https://fractalbits.com/blog/objects-per-second/
2•zzsheng•8m ago•0 comments

Dietary guidelines do not yield sufficient flavanol for cardiovascular benefit

https://pubs.rsc.org/en/content/articlehtml/2026/fo/d6fo00867d
1•littlexsparkee•9m ago•0 comments

AxLLM

https://axllm.dev/
1•handfuloflight•11m ago•0 comments

RIP Fable

https://fable.rip
2•opndragoon•14m ago•0 comments

Lucid to lay off roughly 18% of U.S. workforce, COO Marc Winterhoff leaves

https://www.cnbc.com/2026/06/22/lucid-layoffs-evs.html
1•mgh2•20m ago•0 comments

Clean sweep for Mamdani-backed candidates in New York's Democratic primary

https://www.bbc.com/news/articles/clye652m41po
2•mikhael•30m ago•0 comments

2026 vs. 1996 Chevrolet Blazer IIHS crash test

https://www.youtube.com/watch?v=4U8Ero-3GxI
3•plun9•31m ago•2 comments

VoltanaLLM: Energy-Efficient LLM Serving

https://supercomputing-system-ai-lab.github.io/projects/voltana/
2•matt_d•33m ago•0 comments

2003-era DDR2 memory prices jump up to 60%

https://www.tomshardware.com/pc-components/dram/ddr2-memory-prices-jump-up-to-60-percent
1•pkaeding•34m ago•1 comments

Sakana Fugu Technical Report

https://www.chapterpal.com/s/7ff4f6ba/sakana-fugu-technical-report
1•theanonymousone•34m ago•1 comments

Show HN: Deploy to Vercel, Netlify, Railway, Render, Cloudflare in 1 Command

https://xiaohou2503687-design.github.io/shipfast-oss/
1•shipfastai•34m ago•0 comments

Intel shareholder sues to void deal giving U.S. gov $11B in stock for free

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6985440
4•de6u99er•38m ago•1 comments

Sakana Fugu Ultra promises to deliver "the best frontier-level performance"

https://www.theverge.com/ai-artificial-intelligence/953904/sakana-fugu-ai
1•theanonymousone•43m ago•1 comments

TSMC: 36.1 A 32Gb/s 10.5Tb/s/mm 0.6pJ/b UCIe-Compliant Low-Latency Interface 3nm

https://ieeexplore.ieee.org/document/10904767
2•Alien1Being•43m ago•0 comments

Trump Gets Negative Reviews Internationally as Fewer Say US Is Reliable Partner

https://www.pewresearch.org/global/2026/06/23/trump-gets-negative-reviews-internationally-as-fewe...
3•Bondi_Blue•43m ago•0 comments

OpenAI spending hit $34B last year ahead of planned IPO

https://www.ft.com/content/e15b0d7e-ff6b-4f16-ba7a-4068feddb828
1•1vuio0pswjnm7•44m ago•1 comments

The Junior Developer Problem Is Becoming a Senior Developer Problem

https://www.vincentschmalbach.com/the-junior-developer-problem-is-becoming-a-senior-developer-pro...
3•vincent_s•44m ago•0 comments

Show HN: Fork.ai – branch any AI answer into a mind map instead of a chat log

https://forkai.in
1•gokulmc•46m ago•0 comments

Conspiracy Theories, Spontaneous Orders, and Global Politics [pdf]

https://isonomiaquarterly.com/wp-content/uploads/2025/11/massimino-pfwo.pdf
2•brandonlc•47m ago•1 comments

Lippmann Color Plates

https://www.eastman.org/event/workshops/lippmann-color-plates
1•andsoitis•50m ago•0 comments

Statement from Five Eyes agencies on cyber risk

https://www.ncsc.gov.uk/news/the-ai-shift-in-cyber-risk-why-leaders-must-act-now
2•reasonableklout•50m ago•1 comments

The Rolling Coup

https://www.thenation.com/article/politics/trump-rolling-coup/
2•aanet•50m ago•0 comments

Lippmann Photography

https://www.jonhilty.com/lippmann
1•andsoitis•51m ago•0 comments

MSc Thesis – The Limits of Generalized Sync

https://aaltodoc.aalto.fi/server/api/core/bitstreams/d485ca46-ef01-41bc-ae4c-d468afb209a8/content
1•bebraw•53m ago•1 comments

A Dark Dimension Could Link Two of the Universe's Great Unknowns

https://www.quantamagazine.org/a-dark-dimension-could-link-two-of-the-universes-great-unknowns-20...
2•anujbans•54m ago•0 comments

Distribution of Lightning

https://en.wikipedia.org/wiki/Distribution_of_lightning
1•nomilk•57m ago•0 comments

Mayors Push Data Center Rules to Protect Infrastructure

https://fivetakes.news/40-mayors-worldwide-endorse-a-pact-to-shape-data-center-development-ap-news
1•mmeirovich•57m ago•0 comments

Pizza wheels are bad and Japanese toilets are great

https://www.noahpinion.blog/p/pizza-wheels-are-bad-japanese-toilets
1•rwmj•58m ago•0 comments

Performance of WebAssembly Runtimes in 2026

https://00f.net/2026/06/23/webassembly-runtimes-2026/
2•theanonymousone•1h ago•0 comments

Show HN: Built this to grow my SaaS's social media channels

https://www.clickcast.tech/
1•modulusme•1h ago•0 comments