frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

In Defense of YAML

https://opensource.posit.co/blog/2026-05-21_in-defense-of-yaml/
1•theanonymousone•2m ago•0 comments

Show HN: Free read-only script to find wasted AWS spend

https://cloudbudgetmaster.com/tools/aws-waste-finder/
1•samarth0211•2m ago•0 comments

The GitHub Copilot Bill Came Due. Here's What Engineering Leaders Should Do

https://blog.kilo.ai/p/the-github-copilot-bill-came-due
1•Aireen5858•8m ago•0 comments

Dao Heart 3.13 a symbolic safety layer for value drift and AI alignment research

https://github.com/Mankirat47/Dao-Heart-3.13
1•Mankirat47•10m ago•0 comments

OneDrive data now has an expiry date

https://ms365news.com/blogs/f/your-onedrive-data-now-has-an-expiry-data
2•taubek•13m ago•0 comments

String theory may be inevitable from basic assumptions about the universe

https://www.science.org/content/article/after-empty-promises-string-theory-finds-new-uses
1•isaacfrond•14m ago•0 comments

GitHub is (partially) down again. Do you look for alternatives?

1•Hypnosis6173•17m ago•0 comments

Bitcoin pump to $63,700 triggers the most short liquidations since late April

https://www.coindesk.com/markets/2026/06/08/bitcoin-pump-to-usd63-700-triggers-the-most-short-liq...
1•Varun-Sakhuja•18m ago•0 comments

Mimo v2.5 is better deal than DeepSeek v4 flash

1•shivang2607•19m ago•0 comments

Show HN: Image-3D: photo to 3D splat that runs in the browser

https://mukba.ng/image-3d/
1•mnorris•21m ago•0 comments

The EU Open Source Strategy

https://digital-strategy.ec.europa.eu/en/policies/open-source-strategy
4•vrganj•25m ago•0 comments

DoomBench – benchmarking data stacks running Doom

https://cedardb.com/blog/doombench/
2•krishadi•26m ago•0 comments

GitHub Is Down

https://www.githubstatus.com/incidents/m7n7sm0sr1pz
24•cosuhi•31m ago•17 comments

Atlantic 'cold blob' likely caused by weakening AMOC near a tipping point

https://phys.org/news/2026-06-atlantic-cold-blob-weakening-ocean.html
2•btilly•32m ago•0 comments

A Languages Visualization Experiment

https://github.com/PEZ/languages-visualizations/
1•tosh•35m ago•0 comments

AI Has a Measurement Problem – And it's everyone's problem

https://luisgardea.substack.com/p/ai-has-a-measurement-problem
1•gallardo147•38m ago•1 comments

A 'Miraculous Transformation': How Kim Jong-Un Fortified North Korea

https://www.nytimes.com/2026/06/08/world/asia/north-korea-kim-jong-un-pandemic-economy.html
1•JumpCrisscross•40m ago•0 comments

Turn your architecture into a queryable knowledge graph (renders to Excalidraw)

https://github.com/BV-Venky/excalidraw-architect-mcp
2•Venky1729•41m ago•0 comments

Age verification tech could put children at greater risk, says think tank

https://www.computerweekly.com/news/366643835/Age-verification-tech-could-put-children-at-greater...
5•robtherobber•44m ago•0 comments

Minimal, Meaningful, Comfortable, Durable Bracelets for Dads

https://glintandluck.com/blogs/news/best-dad-bracelet-ideas-for-father-s-day-meaningful-gift-guide
2•Chris_taka•45m ago•0 comments

Show HN: Pingtrace

https://github.com/skhell/pingtrace
1•skhell•49m ago•0 comments

Gen Z turn to 'dopamine sites' for quick comfort

https://www.koreatimes.co.kr/lifestyle/trends/20260527/gen-z-turn-to-dopamine-sites-for-quick-com...
4•jnakano89•51m ago•1 comments

Show HN: Live Voice Translation Interpreter [video]

https://www.youtube.com/shorts/H1alb-d1fOo
1•julienreszka•51m ago•0 comments

Show HN: AI Boost – an MCP for accessing your everyday patterns

https://www.ai-boost.io/
1•npiano•54m ago•0 comments

NexusOS v2.0 – A zero-dependency pipeline streaming server chaos to Parquet

https://huggingface.co/datasets/Amman-shah/ecommerce-production-incident-postmortems
1•nexus_os•1h ago•0 comments

Ecotypes Harbor the Genetic Memory of a Species' Past

https://www.quantamagazine.org/how-ecotypes-harbor-the-genetic-memory-of-a-species-past-20260521/
2•vfalbor•1h ago•0 comments

Show HN: Multiplayer, session-based runtime data collection for coding agents

https://www.multiplayer.app/
1•argoeris•1h ago•0 comments

SwiftUI Only Makes It Easy to Develop Bad Apps

https://daringfireball.net/2026/06/swiftui_only_makes_it_easy_to_develop_bad_apps
2•frizlab•1h ago•0 comments

An open letter to office suite users, just before the Euro-Office announcement

https://blog.documentfoundation.org/blog/2026/06/08/an-open-letter/
4•linker3000•1h ago•0 comments

The notational conventions I adopted, and why (EWD 1300)

https://www.cs.utexas.edu/~EWD/transcriptions/EWD13xx/EWD1300.html
2•tosh•1h ago•0 comments