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

Hot Chips 2026: Intel's Diamond Rapids

https://chipsandcheese.com/p/hot-chips-2026-intels-diamond-rapids
1•ingve•5m ago•0 comments

Screen time at ages 1 and 6 may matter more than parents realize

https://www.sciencedaily.com/releases/2026/08/260823094152.htm
2•01-_-•6m ago•0 comments

All AI Data Centers Under Construction Could Emit as Much CO₂ as 24M Cars

https://www.gadgetreview.com/all-ai-data-centers-under-construction-could-emit-as-much-co%e2%82%8...
1•01-_-•7m ago•1 comments

Ask HN: Coding is a solved problem. What is left for experienced engineers?

1•gokuljs•8m ago•3 comments

China's Oil Demand 'Likely' Peaked Last Year, Sinopec Says

https://www.bloomberg.com/news/articles/2026-08-24/china-s-oil-demand-very-likely-peaked-last-yea...
2•xbmcuser•11m ago•1 comments

What happens when you benchmark 1B logs on ClickHouse vs. OpenObserve?

https://openobserve.ai/blog/openobserve-vs-clickhouse-one-billion-logs-benchmark/
1•smkumari•12m ago•0 comments

Show HN: Tsiolkovsky's 51k-page archive, machine-read with measured accuracy

https://beskvladimir-create.github.io/tsiolkovsky-papers/
1•vladimirbesk•24m ago•0 comments

Show HN: Planetary Energy Routing Protocol (PERP)

https://github.com/WVGlobal/Planetary-Energy-Routing-Protocol
1•WVGlobal•24m ago•0 comments

Show HN: Submit your good SaaS for free

https://goodsaas.xyz
2•its_ajseven•29m ago•0 comments

Post-scarcity abundance begins by manifesting first as youth unemployment

https://twitter.com/i/status/2092041265781277007
6•Michelangelo11•36m ago•0 comments

"Functional unemployment" nearing 25% in U.S., analysis finds [video]

https://www.youtube.com/watch?v=-y2gKIGFTns
2•mgh2•37m ago•0 comments

Graphene can be made using a kitchen blender, a mobile phone and a newspaper

https://theconversation.com/the-wonder-material-graphene-can-be-made-using-a-kitchen-blender-a-mo...
4•geox•38m ago•0 comments

New technology lets cloud AI models process your data without privacy leaks

https://plugos.net/blog/2026/08/confidential-ai-how-plugclaw-keeps-your-ai-work-private/
4•ElowenWinslet•39m ago•0 comments

'Don't ask me to print your ChatGPT birthday card': Hitting back at AI 'slop'

https://www.bbc.co.uk/news/articles/cq89jpjeq7ko
4•erehweb•39m ago•0 comments

Hot Chips 2026: Intel's Wildcat Lake

https://chipsandcheese.com/p/hot-chips-2026-intels-wildcat-lake
2•ingve•41m ago•0 comments

Open-Weight Masked Introspection: Measuring What LMs Can Report About Their Own

https://arxiv.org/abs/2608.20569
2•sbulaev•43m ago•0 comments

Actually Queryable Executables

https://fzakaria.com/2026/08/24/actually-queryable-executables
3•ingve•44m ago•0 comments

DefCon 34 – Stalking the Wily Hacker: 40 years later – Cliff Stoll [video]

https://www.youtube.com/watch?v=656058JxTM0
5•ericd•52m ago•0 comments

Comparing the two holograms on the Windows 95 box

https://devblogs.microsoft.com/oldnewthing/20260824-00/?p=112643
2•st_goliath•54m ago•0 comments

Show HN: CookWing, an AI chef that doesn't hallucinate quantities

https://play.google.com/store/apps/details?id=com.redwing.vibecooking&hl=en_US
2•BananeDeRungis•56m ago•0 comments

Shazam.el

http://yummymelon.com/devnull/announcing-shazam-el.html
1•Tomte•57m ago•0 comments

Omarchy Exploit

https://www.youtube.com/watch?v=pgNvD9DaZxY
1•krehwell•59m ago•0 comments

Speculative Programmatic Tool Calling

https://alexzhang13.github.io/blog/2026/spec-ptc/
2•iamwil•1h ago•0 comments

Show HN: ShrinkRay – HandBrake for TinyML

https://github.com/TarulAhsan/ShrinkRay
1•EmonAhsan•1h ago•0 comments

Five spending categories absorbed 88% of the US middle fifth's raise (2013-2023)

https://efficientdollar.com/blog/leftover-money-after-essentials/
1•lundj•1h ago•0 comments

LLMPanel Deploy vLLM to RunPod or Vast.ai Without Kubernetes

https://llmpanel.io
1•SquidJack•1h ago•0 comments

Silence Is a Feature

https://aradar.top/posts/silence-is-a-feature/
3•aradar46•1h ago•0 comments

Beyond China's humanoid robots, a quieter machine revolution is unfolding

https://www.bbc.com/news/articles/c62m4zn1q6mo
3•nairteashop•1h ago•0 comments

National Police Union Blasts Flock CEO for Turning Against Police

https://ipvm.com/reports/union-who-flock
1•jhonovich•1h ago•0 comments

Artificial Intelligence Market (2026 – 2033)

https://www.grandviewresearch.com/industry-analysis/artificial-intelligence-ai-market
1•Rutujad•1h ago•0 comments