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

A Claude Code plugin that shows an English rewrite of each assistant message

https://github.com/gvzdv/claudish-to-english
1•iacguy•1m ago•0 comments

'The Data Center Has Taken Everything: Our Lands, Future, Happiness'

https://behanbox.com/2026/08/20/the-data-center-has-taken-everything-our-lands-future-happiness/
1•akbarnama•4m ago•0 comments

Guggenheim loan trades in distressed territory after investor call

https://www.ft.com/content/7069ffff-9534-489d-bf25-9965a1bc48bc
2•petethomas•6m ago•0 comments

Lot #4006: Steve Jobs 8th Grade Science Fair Project

https://www.rrauction.com/auctions/lot-detail/351632607484006-steve-jobs-personally-built-8th-gra...
1•rgovostes•8m ago•0 comments

Micron announces $10B research hub in Boise

https://investors.micron.com/news/press-release/2026/Micron-Unveils-Micron-Research-Labs-a-U-S--B...
1•osnium123•12m ago•0 comments

US debt is rising by about $90k every second, or $7.8B a day

https://www.bbc.co.uk/news/articles/c9d8z72nn02o
2•CircuitSeuss•13m ago•1 comments

Open source a book "Representation, Structure and Transformation"

https://github.com/bfzhao/rst
1•bingfeng•21m ago•0 comments

Trump wants to make a trade deal with Canada

https://asiaviewnews.com/gigabots/Threads?p=130067
1•mark336•25m ago•0 comments

Apple Music to Label AI-Generated Songs

https://www.macrumors.com/2026/08/20/apple-music-to-label-ai-generated-songs/
3•thm•25m ago•2 comments

Sweden became a country of big-state libertarians

https://www.economist.com/europe/2026/08/20/how-sweden-became-a-country-of-big-state-libertarians
1•andsoitis•26m ago•0 comments

Grimshaw vs. Ford Motor Co

https://en.wikipedia.org/wiki/Grimshaw_v._Ford_Motor_Co.
1•vismit2000•27m ago•0 comments

The Horse and Sparrow Economic Theory

http://the13thtribe.blogspot.com/2025/03/the-horse-and-sparrow-economic-theory.html
1•thunderbong•28m ago•0 comments

Anolisa – Agentic OS with runtime, security, observability and token compression

https://github.com/alibaba/anolisa
1•forrestly•28m ago•0 comments

Show HN: I built a permission layer for AI agents, then spent a day breaking it

1•rmanish2000•32m ago•0 comments

Stock indices no longer reflect equity reality

https://www.economist.com/finance-and-economics/2026/08/18/stock-indices-no-longer-reflect-equity...
3•andsoitis•32m ago•2 comments

Show HN: Fifteen – buy a spot on a board where your position decays 5% a day

https://fifteen.show
1•pevide•33m ago•0 comments

Roast my alarm mobile app (please lol)

https://apps.apple.com/us/app/unsnooze-challenge-alarm-clock/id6758871228
1•me_sleepy•33m ago•2 comments

Three ways to smuggle SQLite into Nix

https://fzakaria.com/2026/08/19/three-ways-to-smuggle-sqlite-into-nix
1•setheron•34m ago•0 comments

Can Reddit survive in the AI era?

https://www.economist.com/business/2026/08/20/can-reddit-survive-in-the-ai-era
1•andsoitis•36m ago•1 comments

Seedance 2.5 vs. Wan 3.0 for a 30-second AI video workflow

https://seevido.com/model/seedance-2-5/
2•AIFacefy•36m ago•0 comments

DolphinScheduler Manages Task Group Slots Without Timeout-Based Reclamation

https://medium.com/@ApacheDolphinScheduler/how-apache-dolphinscheduler-manages-task-group-slots-w...
1•DSOfficial•38m ago•1 comments

A Step-ByDeploying DolphinScheduler with Docker on Ubuntu for Data Workflows

https://medium.com/@ApacheDolphinScheduler/a-step-by-step-guide-deploying-apache-dolphinscheduler...
1•DSOfficial•39m ago•1 comments

Data Ingestion Must Never Be a "Black Box"

https://apacheseatunnel.medium.com/data-ingestion-must-never-be-a-black-box-20b4ace4b2d5
2•SeaTunnel•41m ago•0 comments

Codex as a platform: build on the open agent harness

https://developers.openai.com/blog/codex-as-a-platform
1•Alephinitesimal•42m ago•0 comments

Show HN: An autonomous AI agent running one project for two months in public

https://aitoolsinsiderhq.com/log/
1•atlasheyinsider•42m ago•2 comments

Bilibili IndexTTS-2.5

https://huggingface.co/IndexTeam/IndexTTS-2.5
1•linnoe•43m ago•0 comments

Newsletters should be the director's commentary of every creator

https://buttondown.com/blog/sending-cut-scraps
2•Tomte•45m ago•0 comments

Codex on AWS bedrock bug causing 10x charges

https://github.com/openai/codex/issues/37674
6•TheP1000•46m ago•1 comments

Against Intellectual Monopoly

http://dklevine.com/general/intellectual/against.htm
4•Cider9986•54m ago•0 comments

DeepClause meets pi: controlling pi with Prolog and vice versa

https://deepclause.substack.com/p/deepclause-meets-pi-controlling-pi
2•schmuhblaster•56m ago•0 comments