frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•9mo 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•9mo 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•9mo 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).

TDD as Induction

https://blog.ploeh.dk/2026/02/23/tdd-as-induction/
1•vinhnx•38s ago•0 comments

Show HN: Slipshow, a multi-paradigm presentation tool

https://slipshow.org
1•panglesd•1m ago•0 comments

A reliable pick–– Straightforward HTML5 games

https://play2.uaaws.com/
1•TrendSpotterPro•1m ago•0 comments

Piecing Together an Ancient Epic Was Slow Work. Until A.I. Got Involved (2024)

https://www.nytimes.com/2024/08/12/books/booksupdate/ai-ancient-tablets-gilgamesh.html
1•fidotron•2m ago•0 comments

VR exam checks eye health and screens for early signs of Alzheimer's

https://health.ucdavis.edu/news/headlines/virtual-reality-exam-checks-eye-health-and-screens-for-...
1•geox•3m ago•0 comments

fitgpu: cli tool to know if a model will run on your GPU without downloading it.

https://pypi.org/project/fitgpu/
1•prashantpandeyy•3m ago•0 comments

Pockets of Humanity

https://herman.bearblog.dev/pockets-of-humanity/
1•HermanMartinus•4m ago•0 comments

Using AI to Transform Streets

https://transform-streets.vercel.app
1•rkayg•5m ago•1 comments

Foolery v0.3.0 Released

https://github.com/acartine/foolery/releases/tag/v0.3.0
1•therealcartine•6m ago•0 comments

Inkscape project struggling with lack of (active) contributors [video]

https://friprogramvarusyndikatet.tv/w/ofcCwyxiE2VSaJPBFNnZLb
2•black_puppydog•7m ago•1 comments

Termux Commands – Quick Reference – Phone Hacks

1•rocky101•7m ago•0 comments

How the LA Review of Books destroyed itself

https://nobaddaysinla.substack.com/p/how-the-la-review-of-books-destroyed
1•speckx•7m ago•0 comments

Fluxer – FOSS instant messaging and VoIP platform

https://fluxer.app
1•gessha•8m ago•0 comments

Pass the Remote: User Input on TV Devices

https://netflixtechblog.com/pass-the-remote-user-input-on-tv-devices-923f6920c9a8
1•andsoitis•8m ago•0 comments

Superhuman Acquired Rows

https://rows.com/blog/post/rows-is-joining-superhuman
2•FinnLobsien•11m ago•0 comments

Show HN: AgentReady – Drop-in proxy that cuts LLM token costs 40-60%

https://agentready.cloud/hn
2•christalingx•11m ago•1 comments

I Invented a New Metric to See If Work Is Happening

https://ksaweryskowron.substack.com/p/active-work-in-progress
1•mooreds•13m ago•0 comments

The simple rule that could stop South Africa's debt spiral

https://www.joburgetc.com/business/south-africa-fiscal-rule-avoid-financial-collapse/
1•mooreds•14m ago•0 comments

The A.I. Disruption Has Arrived, and It Sure Is Fun

https://www.nytimes.com/2026/02/18/opinion/ai-software.html
1•9woc•16m ago•0 comments

Mental Health Escalation Router

https://github.com/IAmSoThirsty/Mental-Health-Escalation-Router
1•IAmSoThirsty•18m ago•1 comments

Second Chatbot Chess Championship [video]

https://www.youtube.com/watch?v=7S8QPpeCyD8&list=PLBRObSmbZluQwBIvxyiWfm_b495AnpzDn
2•gus_massa•18m ago•1 comments

Straw Checkerboards in Zhongwei: A 70-Year Green Marvel Guiding Global Ecology

https://myglobalnews.net/china/20250814-straw-checkerboards-in-zhongwei-a-70-year-green-marvel-gu...
1•mooreds•19m ago•0 comments

Coffee Break Rhythm: Using Location Pressure as a Productivity Forcing Function

https://www.ssp.sh/brain/coffee-break-rhythm/
1•articsputnik•19m ago•0 comments

Show HN: YAML-schema-router – schemas for multi-doc Kubernetes YAML

https://github.com/traiproject/yaml-schema-router
1•drLuca•21m ago•0 comments

Digital Independence Day

https://muc.ccc.de/en/blog/2025/12/27/digital-independence-day/
1•doener•22m ago•0 comments

Managed OpenClaw hosting, 60-second provisioning

2•yixn_io•23m ago•0 comments

Ukraine's 'Kill Zone'

https://subs.ft.com/viewsubscriptions
2•mmarian•23m ago•0 comments

Everyone in AI is building the wrong thing for the same reason

https://www.joanwestenberg.com/everyone-in-ai-is-building-the-wrong-thing-for-the-same-reason/
2•tsak•23m ago•3 comments

Ask PH: Worktrees or isolated sandboxes for multi-agent AI workloads?

https://agyn.io/blog/isolated-execution-ai-engineering
3•NBenkovich•24m ago•1 comments

Matrix Ain't It Chief

https://xeiaso.net/notes/2026/dont-use-matrix/
5•Tomte•25m ago•0 comments