frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•11mo 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•11mo 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•11mo 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).

AMD GPU LLM Performance Testing

https://github.com/alainnothere/AmdPerformanceTesting
1•xlayn•1m ago•1 comments

Bringing Rust to the Pixel Baseband

https://security.googleblog.com/2026/04/bringing-rust-to-pixel-baseband.html
1•el_duderino•2m ago•0 comments

Jonathan Ive, Designer, Apple – "A computer can be sexy."

https://www.slate.com/articles/technology/top_right/2011/08/jonathan_ive_designer_apple.html
1•goekjclo•2m ago•0 comments

Sam Altman speaks out after alleged attack on SF home,links to rising AI anxiety

https://www.msn.com/en-us/news/crime/sam-altman-speaks-out-after-alleged-attack-on-sf-home-links-...
1•rmason•3m ago•1 comments

Show HN: Palmier – Dispatch and schedule AI agents from your phone

https://www.palmier.me
1•caihongxu•7m ago•0 comments

Latest Episode of Apple's "For All Mankind" Erases Taiwan

https://old.reddit.com/r/taiwan/comments/1sho71p/latest_episode_of_apples_for_all_mankind_erases/
1•GeoPolAlt•8m ago•0 comments

We open sourced KubeezCut, a free browser based editor integrated with Kubeez

https://github.com/MeepCastana/KubeezCut
1•Meeeeeep•10m ago•0 comments

Framework: ' personal computing as we know it is dead'

https://www.pcgamer.com/hardware/framework-there-is-a-very-real-scenario-in-which-personal-comput...
1•evo_9•14m ago•0 comments

'Blips' led Australian backyard astronomers to a world-first planetary discovery

https://www.sbs.com.au/news/article/how-amateur-astronauts-are-reshaping-what-we-know-about-space...
1•defrost•17m ago•0 comments

Families Spent Decades on Louisiana's Bayous. The Power Company Pulled the Plug

https://www.wsj.com/us-news/families-spent-decades-on-louisianas-bayous-the-power-company-pulled-...
2•bookofjoe•18m ago•1 comments

Relics of an ancient sandstorm on Mars point to Earth-like winds

https://www.science.org/content/article/relics-ancient-sandstorm-mars-point-earth-winds
1•gmays•28m ago•0 comments

Yout.com Hopes Supreme Court's Cox Ruling Helps Its Case; RIAA Disagrees

https://torrentfreak.com/yout-com-hopes-supreme-courts-cox-ruling-helps-its-case-riaa-disagrees/
2•Cider9986•30m ago•0 comments

Show HN: I forced Claude to play Tetris in Emacs

https://imgur.com/a/e3nxq5k
2•iLemming•35m ago•0 comments

Elon of Ed-Tech

https://getlearnix.com/
1•noahjohnson1•35m ago•3 comments

Tutorial on Event-based Cameras(2020) [pdf]

https://rpg.ifi.uzh.ch/docs/scaramuzza/Tutorial_on_Event_Cameras_Scaramuzza.pdf
1•o4c•44m ago•0 comments

New Kodak Film – Verita 200D Colour Negative

https://www.kodak.com/en/company/press-release/kodak-verita-200d-color-negative-film/
1•coolandsmartrr•48m ago•2 comments

The War Is Turning Iran into a Major World Power

https://www.nytimes.com/2026/04/06/opinion/iran-war-strait-hormuz.html
3•spopejoy•48m ago•2 comments

Google's Gmail Upgrade Decision: 2B Users Must Act Now

https://www.forbes.com/sites/zakdoffman/2026/04/10/googles-gmail-upgrade-decision-2-billion-users...
6•teleforce•54m ago•3 comments

Give your coding agents the context your repo has

https://aspenkit.dev/
2•mvoutov•58m ago•0 comments

Neural Computers

https://arxiv.org/abs/2604.06425
2•Anon84•58m ago•0 comments

RAG 40x faster using binary quantization (2024)

https://lightning.ai/lightning-ai/templates/rag-40x-faster-using-binary-quantization
4•teleforce•1h ago•0 comments

From error-handling to structured concurrency

https://blog.nelhage.com/post/concurrent-error-handling/
1•vinhnx•1h ago•0 comments

Our response to the Axios developer tool compromise

https://openai.com/index/axios-developer-tool-compromise/
7•surprisetalk•1h ago•0 comments

40x Faster Binary Search

https://www.p99conf.io/session/40x-faster-binary-search/
2•teleforce•1h ago•0 comments

Adding Structured Concurrency to JavaScript

https://github.com/bakkot/structured-concurrency-for-js
1•PaulHoule•1h ago•0 comments

Search demand for "coffee shop near me" across 1k US cities

https://www.sextaris.com/blog/coffee-shop-near-me-1000-us-cities
1•verzhykovskyi•1h ago•0 comments

[STORY] Watching Abandoned Toddlers as the End Approaches

https://www.tumblr.com/bixbythemartian/633183446892691456/writing-prompt-s-youre-a-daycare-worker
2•barry-cotter•1h ago•0 comments

Request Camel Numbering

https://gov.om/w/request-camel-numbering
3•earksiinni•1h ago•0 comments

Git per sviluppatori: guida completa dai comandi base al workflow professionale

https://donatodelpeschio.it/blog/git-guida-completa-comandi-workflow
1•donnyBlanko•1h ago•0 comments

A bet on whether ML-KEM-768 or X25519 will break first

https://github.com/FiloSottile/ecc-vs-lattices-long-bet
1•figsoda•1h ago•1 comments