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

Rhombus version 1.0 is now available

https://racket.discourse.group/t/rhombus-version-1-0-is-now-available/4292
1•Decabytes•2m ago•0 comments

Finding the Best Dog Treat with Statistics

https://www.wespiser.com/posts/2026-06-19-best-dog-treat.html
4•wespiser_2018•5m ago•1 comments

Zero Weights Graph Language Engine (MSE-GLM)

https://aircityshops.com/index.php?url=city/mse_blog
2•fodokidza•9m ago•0 comments

The inspection paradox is everywhere

http://allendowney.blogspot.com/2015/08/the-inspection-paradox-is-everywhere.html
4•fanf2•10m ago•0 comments

Harper Appoints Its First Committer

https://elijahpotter.dev/articles/harper%27s-first-committer
3•chilipepperhott•10m ago•0 comments

Offline ML-based audio stabilizer (CEPA Logic)

https://github.com/AdBusterOfficial/Adbuster--WinApp
2•Bo_Amigo_910•11m ago•0 comments

Younger workers avoid phone calls and it might cost them opportunities

https://www.businessinsider.com/young-workers-genz-millennials-avoiding-phone-calls-paying-a-pric...
5•andrewstetsenko•12m ago•1 comments

Network shares in KDE: still talking about them in 2026

https://pointieststick.com/2026/06/22/network-shares-still-talking-about-them-in-2026/
3•ChiptuneIsCool•12m ago•0 comments

AI-Generated 'FIFA World Cup' DMCA Notices Ask Google to Delist Pirate Sites

https://torrentfreak.com/ai-generated-fifa-world-cup-dmca-notices-ask-google-to-delist-pirate-sites/
3•speckx•12m ago•0 comments

Harness Acquires Codecov from Sentry

https://www.harness.io/press-and-news/harness-acquires-codecov
2•eatonphil•15m ago•0 comments

An open-source attempt to finish Star Citizen before Star Citizen does

https://github.com/huiung/claude-citizen
3•echocrest•16m ago•0 comments

Optimizing Models to Be Fast at Codegen

https://www.morphllm.com/blog/codegen-inference-research
2•gmays•16m ago•0 comments

Widelands – 20 years of open source 1.0 [video]

https://www.youtube.com/watch?v=qA2inaP2Nyk
2•coolwulf•19m ago•0 comments

The Steam Machine is the most ambitious game console I've ever played

https://www.theverge.com/games/952765/steam-machine-review
2•tabletcorry•20m ago•0 comments

OpenAI signs deal to show Getty's images in ChatGPT results

https://www.engadget.com/2198633/openai-signs-deal-with-getty-to-show-images-in-chatgpt-results/
4•lardass•20m ago•2 comments

Ask HN: Anyone got a 43" 4K? Thoughts?

2•herodoturtle•20m ago•0 comments

Show HN: Kitcat 2.0 – A Matplotlib back end for terminal plotting

https://mil.ad/blog/2026/kitcat-2.0.html
2•playnext•22m ago•0 comments

Show HN: Ingestlayer – Programmable event tracking pipelines

https://ingestlayer.com
2•benmann•25m ago•0 comments

Can You Spot the AI Bodega?

https://www.curbed.com/article/ai-slop-bodega-signage-design.html
2•SVI•26m ago•0 comments

Show HN: Open-source job search plugin for Claude Code

https://github.com/agent-data/job-search
2•jb_hn•26m ago•0 comments

VigilSwift – A fast, free web security scanner built for devs

https://vigilswift.com
2•alex_vs•26m ago•0 comments

Five Eyes warns AI models capable of toppling governments are months away

https://www.theguardian.com/technology/2026/jun/22/anthropic-claude-fable-ai-model-artificial-int...
8•speckx•33m ago•4 comments

Steam Machine Launches Today

https://store.steampowered.com/news/group/45479024/view/685257114654870245
34•no_news_is•33m ago•6 comments

Steam Machine game testing

https://www.lttlabs.com/articles/2026/06/22/the-newell-nucleus-steam-machine-ltt-companion-article
18•LabsLucas•35m ago•8 comments

Iris – A portable runtime for durable AI agents

https://github.com/xoai/iris
3•xoai•35m ago•0 comments

Show HN: Block/buzz: a workspace built for teams of humans and agents

https://github.com/block/buzz
11•ThomPete•36m ago•1 comments

Geometry of causal set theory with physics implications

https://docs.google.com/document/d/1yYXSX_XssHXV5msGj2eC74fs6P2PG_sL/edit
2•Darktidemage•36m ago•1 comments

Angeldust – a solo-built voxel world that runs on everything [video]

https://www.youtube.com/watch?v=zssnlbRibFM
2•coolwulf•37m ago•0 comments

Does AI have a UI/UX problem?

https://twitter.com/PereraBinoy/status/2068432457234513955
3•adisingh13•38m ago•1 comments

Daybreak: Tools for securing every organization in the world

https://openai.com/index/daybreak-securing-the-world/
5•tabletcorry•38m ago•0 comments