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

Browsers are becoming more bloated

https://waspdev.com/articles/2026-08-28/browsers-are-becoming-more-bloated
1•senfiaj•28s ago•0 comments

AI Safety and Pacing the Frontier

https://eshumarneedi.com/2026/09/15/on-ai-safety-and-pacing.html
1•meetpateltech•1m ago•0 comments

Show HN: Cubespotting – A New Way to Learn

https://www.cubespotting.com/
1•npguy•1m ago•0 comments

Real Use Cases of Muse

https://musecases.netlify.app/
1•trulykp•1m ago•1 comments

Pyrefly v1.3: More configurability and composable tensor shapes

https://pyrefly.org/blog/v1.3/
1•ocamoss•4m ago•0 comments

Windows-focused fork of OpenUsage for tracking AI coding subscription usage

https://github.com/ccycv/openusage
1•soltanov•7m ago•0 comments

Teleoperated Humans

https://www.jefftk.com/p/teleoperated-humans
1•mhb•8m ago•0 comments

APC AI-assisted framework for building audio (VST/AU) plugins

https://github.com/Noizefield/audio-plugin-coder
1•noizefield•9m ago•0 comments

OpenStreetMap fighting a large set of AI crawlers / scrapers

https://en.osm.town/@osm_tech/117273699871137554
3•pera•10m ago•0 comments

Kubernetes v1.37: DRA Updates

https://kubernetes.io/blog/2026/09/03/kubernetes-v1-37-dra-updates/
1•hnp9j9qtda•11m ago•0 comments

More U.S. Workers (27%) Fear Losing Their Jobs to Technology

https://news.gallup.com/poll/714368/workers-fear-losing-jobs-technology.aspx
1•giuliomagnifico•11m ago•0 comments

Show HN: Restarted – a 2026 remake of the classic 2015 startup generator

https://restarted.io/?z=477799172922
1•zxcvbn4038•11m ago•0 comments

Online hate researcher keeps hammering X despite deportation threat

https://arstechnica.com/tech-policy/2026/09/online-hate-researcher-keeps-hammering-x-despite-depo...
1•rbanffy•13m ago•0 comments

.NET MVC Recommended Resources

https://learn.microsoft.com/en-us/aspnet/mvc/overview/getting-started/recommended-resources-for-mvc
1•Brysonbw•13m ago•0 comments

Domain Coloring

https://www.algorithm-archive.org/contents/domain_coloring/domain_coloring.html
1•vismit2000•14m ago•0 comments

Bums in Seats Used to Win

https://mihai.dinculescu.dev/posts/bums-in-seats-used-to-win/
1•faithraven•15m ago•0 comments

GPUI-CE: A GPU-Accelerated UI Framework for Rust by the makers of Zed

https://gpui-ce.github.io
1•sagacity•15m ago•0 comments

Apple iPhone Duo makes developers think in folds

https://www.theregister.com/devops/2026/09/15/apple-iphone-duo-makes-developers-think-in-folds/52...
1•joebuckwilliams•17m ago•0 comments

Tell the speakers that you liked their talks

https://ohhelloana.blog/tell-the-speakers/
1•whisper2020•18m ago•0 comments

25 Years of Mass Surveillance Is Enough

https://www.schneier.com/blog/archives/2026/09/25-years-of-mass-surveillance-is-enough.html
4•iamnothere•19m ago•1 comments

Do you still read the code?

https://zanlib.dev/blog/do-you-still-read-the-code/
3•wofo•22m ago•1 comments

Jalapeño Shows Power of LLMs for Chip Design

https://spectrum.ieee.org/llms-for-chip-design
2•rbanffy•23m ago•0 comments

Representing application state using SQLite

https://world.hey.com/apetrov/representing-application-state-using-sqlite-b9875b47
1•apetrov•23m ago•0 comments

When Google Cuts Off Access: Poland and the World

https://dossier.reasoner.pl/artykul/
3•marekfocus•25m ago•0 comments

Golden Nerves

https://sites.google.com/view/golden-nerves/
1•parydaws•25m ago•0 comments

Doesn't Want Me to Leave When He's Still in Love with His Baby Mama

https://etechx.co.ke/doesnt-want-me-to-leave-when-hes-still-in-love-with-his-baby-mama
1•ndegekmw•25m ago•0 comments

Ask HN: How do you prevent sensitive data from leaking through debugging tools?

1•Securelytixdev•28m ago•0 comments

IndieRoadmaps – a simple roadmap builder for indie hacker

https://indieroadmaps.com
1•pho3n1x•30m ago•1 comments

FloorPoll – live polls your audience joins in one tap

https://floorpoll.app/
1•tshrove•31m ago•0 comments

DotNet Security Cheat Sheet

https://cheatsheetseries.owasp.org/cheatsheets/DotNet_Security_Cheat_Sheet.html
1•Brysonbw•32m ago•0 comments