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

Visualizing Buns new Rust Files against the rest of the JavaScript / cpp

https://old.reddit.com/r/bun/comments/1ur8ka2/visualizing_the_rust_portion_of_bun_against/
1•fernando-ram•20s ago•0 comments

The family of a man shot by the Tennessee National Guard demands video release

https://apnews.com/article/memphis-national-guard-shooting-tyrin-johnson-6a1ea3e51176d8ddf6519f90...
1•petethomas•53s ago•0 comments

Family demands an independent probe after ICE officer shoots a man in Houston

https://apnews.com/article/ice-houston-shooting-lorenzo-salgado-araujo-2d01ba69caf2445f0500509689...
1•petethomas•4m ago•0 comments

The Trump admin is ramping up pressure on states to change election practices

https://apnews.com/article/trump-voting-threat-states-3ec6b7838c97342965416756c0b83496
2•petethomas•6m ago•0 comments

New report highlights reasons for hope in the climate fight

https://www.unep.org/news-and-stories/story/new-report-highlights-five-reasons-hope-climate-fight
1•cybermango•8m ago•0 comments

A New 'Little House' Expands and Updates the Prairie

https://www.nytimes.com/2026/07/08/arts/television/little-house-on-the-prairie-netflix.html
1•indigodaddy•10m ago•0 comments

Verbalizable Representations Form a Global Workspace in Language Models

https://transformer-circuits.pub/2026/workspace/index.html
3•tristenharr•11m ago•1 comments

Earth may survive the sun's death

https://www.space.com/astronomy/earth/earth-may-survive-the-suns-death-after-all-new-study-suggests
1•cybermango•12m ago•0 comments

Show HN: Udemy/Skillshare Meets Clippy

https://missionforgehq.com/
1•Drewsimpson•13m ago•0 comments

Show HN: Jdan's Japan subway station icons

https://trains.jordanscales.com/
1•jordanscales•14m ago•0 comments

NASA begins funding hardware for 'Skyfall' Mars helicopter mission

https://www.space.com/space-exploration/missions/nasa-begins-funding-hardware-for-skyfall-mars-he...
1•cybermango•14m ago•0 comments

Show HN: I ran 70 MCP servers in a sandbox and logged what they do

https://github.com/BhaveshThapar/mcp-audit
1•bthapar•17m ago•1 comments

Creatine doesn't just build muscle. It may also help fight cancer

https://www.sciencedaily.com/releases/2026/07/260701015237.htm
5•Jimmc414•19m ago•1 comments

Tripping on Acid

https://scotmurphy.com/2026/07/08/tripping-on-acid/
2•tekjess•22m ago•1 comments

Policy Statement Concerning the Suppression of Accuracy in AI Systems

https://www.federalregister.gov/documents/2026/07/07/2026-13628/policy-statement-concerning-the-s...
4•sebastian_z•28m ago•1 comments

A Fleet, Not an Assistant

https://bartkolendowski.com/writing/a-fleet-not-an-assistant.html
1•riskcomplex•29m ago•0 comments

Show HN: A shallow lake's report on itself

https://ashallowlake.com/
1•tough•29m ago•0 comments

A Roomba recorded a woman on the toilet. How did screenshots end up on Facebook?

https://www.technologyreview.com/2022/12/19/1065306/roomba-irobot-robot-vacuums-artificial-intell...
8•rmason•34m ago•0 comments

Understanding ECS from Kubernetes Perspective

https://muhammadraza.me/2026/ecs-explained-visually/
4•mraza007•39m ago•0 comments

How to Be a Good open-source Maintainer

https://piechowski.io/post/how-to-be-a-good-open-source-maintainer/
4•grepsedawk•41m ago•0 comments

Show HN: Yaw – digital logbook for glider pilots

https://yawflight.com/
2•mantcz•42m ago•0 comments

Native-speed vLLM transformers modeling back end

https://huggingface.co/blog/native-speed-vllm-transformers-backend
2•simonpure•45m ago•0 comments

Google Vibe Coding vs. Agentic Engineering White Paper

https://www.kaggle.com/whitepaper-the-new-SDLC-with-vibe-coding
2•grepsedawk•46m ago•0 comments

Show HN: A tool that checks how your business appears in AI search

https://www.tryagentscore.com
2•nikhilsiyer•47m ago•1 comments

Every Way Meta Tracks You, and How to Stop It [video]

https://www.youtube.com/watch?v=Yv2Eb_kJous
3•nalekberov•50m ago•0 comments

DSS Code Prime

https://github.com/dailysoftwaresystems/dss-code-prime
2•rgasperetti•51m ago•0 comments

Are Argentina being treated favourably at World Cup?

https://www.bbc.co.uk/sport/football/articles/cx2wkwd7e6go
2•password54321•52m ago•0 comments

Show HN: Day planner shaped like a clock (2-way calendar and Todoist sync)

https://reassign.app
1•smuk3c•53m ago•0 comments

Adsb.fi

https://adsb.fi/
3•rolph•53m ago•0 comments

Lessons from the Vasa Shipwreck

https://www.ft.com/content/200a6c44-9b66-4af3-82eb-98acb53898e4
1•bookofjoe•55m ago•1 comments