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

Show HN: AI-org – org-mode powered by AI

https://ai-org.net/
1•mannders•5m ago•0 comments

What Is an Array?

https://www.jsoftware.com/papers/array.htm
1•tosh•7m ago•0 comments

New charter gives River Wye the right to be free from pollution

https://www.bbc.co.uk/news/articles/czx21820rn4o
3•susam•17m ago•0 comments

Yocto vs. Debian for building embedded Linux systems

https://sigma-star.at/blog/2026/05/you-probably-dont-need-yocto-and-thats-fine/
2•fanf2•23m ago•0 comments

Building a game engine for 20 years [video]

https://www.youtube.com/watch?v=4d-CKaBpLC4
1•AshleysBrain•24m ago•0 comments

Zig: Build System Reworked

https://ziglang.org/devlog/2026/#2026-05-26
3•tosh•26m ago•1 comments

Thunderbolt-Ibverbs: InfiniBand for Everyone

https://blog.hellas.ai/blog/thunderbolt-ibverbs/
2•grw_•27m ago•0 comments

Rsync 3.4.3 has hundreds of Claude commits

https://mastodon.gamedev.place/@JeremiahFieldhaven/116654345332213390
34•fooker•32m ago•12 comments

Apple working to cram Gemini model into iPhone to power new Siri

https://arstechnica.com/ai/2026/05/apple-reportedly-trying-to-distill-googles-multi-trillion-para...
3•TMWNN•32m ago•1 comments

How we run Gemini at scale across billions of posts

https://www.modash.io/engineering/how-we-run-gemini-at-scale-across-billions-of-posts
1•igarnedo•33m ago•0 comments

How many emails should be in the waitlist before launching an application?

1•dash_ai•34m ago•1 comments

Microsoft wants you to share your health symptoms with its new Copilot tool

https://www.xda-developers.com/microsoft-wants-you-to-share-your-symptoms-with-its-new-copilot-he...
2•01-_-•38m ago•0 comments

ICE to keep an eye on your eyes under $25M biometric scanner deal

https://www.theregister.com/public-sector/2026/05/29/ice-awards-bi2-25m-contract-for-1570-biometr...
3•01-_-•39m ago•0 comments

Putin's $26B Quest for Longevity

https://www.wsj.com/world/russia/putin-longevity-antiaging-92dee6e8
3•kubami•41m ago•0 comments

Best OLM to PST Converter Tool to Convert Mac OLM to PST

https://apps.microsoft.com/detail/9n7jk7z3546j?hl=en-US&gl=US
1•tieanderson•41m ago•0 comments

Mercedes-Benz may be shut out of U.S. market due to Chinese ownership

https://www.cnbc.com/2026/05/29/mercedes-benz-ban-congressional-bill-china-ownership.html
2•KnuthIsGod•43m ago•0 comments

Meta Lays Off 8k Employees, as A.I. Casualties Mount

https://www.nytimes.com/2026/05/19/technology/meta-layoffs-ai.html
2•tagyro•46m ago•1 comments

The true power of regular expressions (2012)

https://www.npopov.com/2012/06/15/The-true-power-of-regular-expressions.html
1•downbad_•53m ago•1 comments

'Mind-blowing': Iron-rich immune cells help homing pigeons navigate

https://www.science.org/content/article/mind-blowing-iron-rich-immune-cells-help-homing-pigeons-n...
3•XzetaU8•1h ago•0 comments

The SLAX Scripting Language: An Alternate Syntax for XSLT

http://juniper.github.io/libslax/slax-manual.html
1•thefilmore•1h ago•0 comments

Danish pension fund excludes SpaceX citing governance and valuation

https://www.reuters.com/legal/transactional/danish-pension-fund-excludes-spacex-citing-governance...
32•vrganj•1h ago•10 comments

Tesla Self-Certifies Level 4 Autonomous Vehicles in Texas

https://www.notateslaapp.com/news/4216/tesla-self-certifies-l4-autonomy-in-texas
13•frankacter•1h ago•2 comments

Sana high-resolution image and video generation from NVidia

https://github.com/NVlabs/Sana
1•andsoitis•1h ago•0 comments

Privacy and security on computing devices need to become far stronger

https://xcancel.com/GrapheneOS/status/2044440381803069778#m
14•Cider9986•1h ago•0 comments

A $2k AI-generated film will make its debut at Tribeca

https://www.theverge.com/entertainment/939067/ai-film-dreams-of-violets-tribeca
2•fuzzythinker•1h ago•0 comments

xPrize Launches Hackathon with $2M Prize Pool, Backed by Google

https://www.xprize.org/news/xprize-launches-hackathon-with-2-million-prize-pool-backed-by-google
2•T-A•1h ago•0 comments

Stanford scientists just built a room-temperature quantum device

https://maketecheasier.com/stanford-scientists-just-built-a-room-temperature-quantum-device-that-...
1•SVI•1h ago•1 comments

An Excruciatingly Detailed Guide to SSH

https://grahamhelton.com/blog/ssh-cheatsheet
4•thunderbong•1h ago•0 comments

Virtual Railfan

https://virtualrailfan.com:443/
2•tkgally•1h ago•0 comments

Expanding the lifespan of solid-state batteries

https://www.mpg.de/26391218/how-dendrites-shorten-the-lifespan-of-solid-state-batteries
2•croes•1h ago•0 comments