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

Automating Figma-to-Code

https://www.coinbase.com/blog/automating-figma-to-code-at-coinbase
1•dukebartnik•1m ago•0 comments

Capita launched civil service pension scheme site without 'basic' web security

https://www.computerweekly.com/news/366643878/Capita-launched-civil-service-pension-scheme-site-w...
1•latein•2m ago•0 comments

Consciousness is a great mystery. Its definition isn't

https://www.theintrinsicperspective.com/p/consciousness-is-a-great-mystery
1•Ariarule•2m ago•0 comments

"Rationalist" Dating Strategy

https://www.betonit.ai/p/rationalist-dating-strategy
1•jger15•2m ago•0 comments

GIFBreeder

https://alexrez.com/openendedness/gifbreeder/index.html
1•ksymph•3m ago•0 comments

Canada says AI strategy will help create 250k jobs, boost GDP by 3%

https://www.reuters.com/business/world-at-work/canada-says-ai-strategy-will-help-create-250000-jo...
2•thm•6m ago•0 comments

iSCSI vs. NVMe/TCP: The Storage Showdown for Red Hat OpenShift Virtualization

https://developers.redhat.com/articles/2026/06/04/iscsi-vs-nvmetcp-ultimate-storage-showdown-red-...
2•tanelpoder•7m ago•0 comments

Flying High on Impunity

https://georgiebc.wordpress.com/2026/06/01/flying-high-on-impunity/
1•ortr•7m ago•0 comments

Nvidia Nemotron 3 Ultra

https://research.nvidia.com/labs/nemotron/Nemotron-3-Ultra/
2•wavesound•8m ago•0 comments

Blanket: A library for writing deterministic tests of multithreaded Python code

https://github.com/larryhastings/blanket
1•AdilZtn•11m ago•0 comments

K Slices, K Dices

https://beyondloom.com/blog/slicedice.html
1•tosh•14m ago•0 comments

Brave Origin

https://brave.com/origin/
4•berlianta•14m ago•2 comments

Overview of Canada's National Artificial Intelligence Strategy: AI for All

https://ised-isde.canada.ca/site/ised/en/artificial-intelligence-ecosystem/overview-canadas-natio...
1•BiraIgnacio•14m ago•0 comments

INL discovers new behavior in plutonium that could reshape nuclear science

https://inl.gov/feature-story/a-quantum-leap-inl-discovers-new-behavior-in-plutonium-that-could-r...
1•SVI•15m ago•0 comments

The longer it has taken, the longer it will take (2015)

https://www.johndcook.com/blog/2015/12/21/power-law-projects/
1•downbad_•15m ago•0 comments

After 20 years, scientists shrink a powerful laser onto a chip

https://www.sciencedaily.com/releases/2026/06/260604044240.htm
1•SVI•16m ago•0 comments

ColombiaEscoge – Plataforma para que los colombianos voten con información

https://www.colombiaescoge.com/
2•mcormik•19m ago•1 comments

Nvidia Nemotron 3 Ultra Is Live

https://blogs.nvidia.com/blog/nvidia-gtc-taipei-computex-2026-news/
2•pretext•19m ago•0 comments

Scala Was an Experiment That Changed Programming – Interview with Martin Odersky

https://www.youtube.com/watch?v=Xn_YpUtXWT4
1•theanonymousone•23m ago•0 comments

OpenAI CEO Sam Altman admits AI token costs are becoming 'an issue'

https://www.tomshardware.com/tech-industry/artificial-intelligence/openai-ceo-sam-altman-admits-a...
6•speckx•23m ago•1 comments

Enshittification, Despotification, and the Open Internet

https://www.liberalism.org/p/enshittification-despotification-and-the-open-internet
4•mooreds•24m ago•0 comments

Why chatbot AI costs vary 20x for the same job: pricing model, not the tool

https://wexio.io/blog/best-chatbot-small-business
2•Puvvl•24m ago•0 comments

I forked Bettercanvas as a free and open source extension and published it

https://chromewebstore.google.com/detail/canvasrefined/ihienfbdfdamhmhhiokjnjmpjgbenedg
2•GuySan•26m ago•1 comments

Azure Linux 4.0

https://techcommunity.microsoft.com/blog/linuxandopensourceblog/announcing-azure-linux-4-0-purpos...
2•madspindel•26m ago•0 comments

Anina: The discovery infrastructure for the next iconic brands

https://anina.app/
1•Marcelorz•26m ago•1 comments

Show HN: Zerostack, an open coding agent optimized for memory footprint

https://gi-dellav.github.io/zerostack/
2•gidellav•27m ago•0 comments

DeepSWE results are unreliable – 3/3 DSv4 "failed" tasks solved with same model

https://github.com/datacurve-ai/deep-swe/issues/21
1•theanonymousone•28m ago•0 comments

Show HN: Recursi – self-improving LLM-connected coding environment

https://recursi.dev/
1•robbrown451•28m ago•1 comments

Trump plans $700M in new coal support

https://www.reuters.com/legal/litigation/trump-plans-700-million-new-coal-support-white-house-off...
3•JumpCrisscross•29m ago•1 comments

Notes about a random free project I did 30 days ago (yt video transcriptions)

1•cristyg0101•29m ago•0 comments