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

WinUI development is now happening on GitHub

https://github.com/microsoft/microsoft-ui-xaml/discussions/10700
1•neversaydie•2m ago•0 comments

PGTerm: Postgres Terminal

https://pgterm.dev/
1•handfuloflight•4m ago•0 comments

Functional State Machines in Rust: Typestate and Newtype Patterns

https://dl.acm.org/doi/10.1145/3830438.3830958
1•matt_d•5m ago•0 comments

Apple takes first immersive baseball swings from the on-deck circle

https://sixcolors.com/post/2026/08/apple-takes-first-immersive-baseball-swings-from-the-on-deck-c...
2•MBCook•10m ago•0 comments

Thoughts and Observations on Apple's First Immersive MLB Broadcast

https://daringfireball.net/2026/08/thoughts_and_observations_apple_immersive_mlb_broadcast
1•MBCook•11m ago•0 comments

Zero-sum thinking will fuel resentment and scarcity

https://www.ft.com/content/492134e9-49eb-4f13-b70a-b2b595ed0e2a
2•bookofjoe•11m ago•2 comments

Breaking persistent undo shows Neovim can't be trusted

https://infosec.exchange/@david_chisnall/117171776562702259
2•hoorible•13m ago•0 comments

An infinite and interactive AI generated live stream of slop

https://skunkworks.levels.io/infinite-slop/
2•smusamashah•19m ago•0 comments

DHS is using obscure law to snoop on journalists, non-profits, unions

https://www.theguardian.com/us-news/2026/aug/29/trump-dhs-1509-summons-records-journalists-nonpro...
20•firefax•22m ago•2 comments

From single call to agents: five new Claude capabilities available in MS Foundry

https://devblogs.microsoft.com/foundry/five-new-claude-capabilities-now-available-in-foundry/
2•ibobev•24m ago•0 comments

Wrapping a callable in a lambda that just calls it with the same parameters

https://devblogs.microsoft.com/oldnewthing/20260819-00/?p=112624
1•ibobev•25m ago•0 comments

The Internet Is Kind of a Predatory Cesspit Now

https://www.stephendiehl.com/posts/internet_predatory_cesspit/
78•ibobev•26m ago•33 comments

Mirror Mirror – mirror your PC screen to your phone over Wi-Fi, no cloud

https://github.com/maco30001/Mirror-Mirror
1•maco30001•26m ago•0 comments

Texas Gov. Greg Abbott says China isn't behind the anti-data-center debate

https://www.businessinsider.com/china-influence-data-center-x-greg-abbott-texas-2026-8
2•newsomix9xl•27m ago•0 comments

LLMs are making me lose my savviness

https://pgaleone.eu/ai/2026/08/29/losing-savviness/
2•me2too•28m ago•1 comments

Show HN: AI Harness that lets a graph of Codex and Claude intercommunicate

https://github.com/rysh-ai/rysh-cli-code
1•halilagin•32m ago•1 comments

Library of Automatic Hyperparameters

https://pypi.org/project/pichak/
1•olespichak•33m ago•0 comments

I wanted to find the slowest fashion imaginable: the woman growing her own dress

https://www.theguardian.com/fashion/2026/aug/29/slow-fashion-why-one-woman-growing-her-own-dress
3•mellosouls•35m ago•0 comments

A history of stealing from employer may no longer prevent being hired by FBI

https://www.cbsnews.com/news/fbi-candidates-prostitutes-theft/
5•hn_acker•36m ago•2 comments

The signal went up. The code got worse

https://github.com/olesxg/flap-findings/blob/master/writing/the-signal-went-up.md
1•olespichak•37m ago•0 comments

Sony Music and Warner Chappell Are Suing Anthropic

https://www.theverge.com/ai-artificial-intelligence/986438/sony-music-warner-chappell-anthropic-l...
8•speckx•38m ago•1 comments

Feel the tokens/s before you buy the GPU

https://llmspeed.dev/
1•albinstman•41m ago•0 comments

Fractal Jittered Voronoi Partitions

https://www.boristhebrave.com/2026/08/29/fractal-jittered-voronoi-partitions/
2•jp3141•42m ago•1 comments

Plato

https://plato.stanford.edu/entries/plato/
2•mellosouls•43m ago•0 comments

Winnow: Timeline on X, minus the bot sludge

https://winnow.sbintekamal06.chatgpt.site
1•SadiquaBinteKam•44m ago•0 comments

vLLM v0.28.0

https://github.com/vllm-project/vllm/releases/tag/v0.28.0
1•mrrrcs•44m ago•0 comments

Ship the Tool, Not the Agent

https://ttvl.co/notes/ship-the-tool-not-the-agent/
1•meetpateltech•45m ago•0 comments

Implicit Outer Joins in Join-to-One: Feature or Flaw?

https://www.salvis.com/blog/2026/08/29/implicit-outer-joins-in-join-to-one-feature-or-flaw/
2•theanonymousone•47m ago•0 comments

Is anyone else's GitHub search broken?

4•NooneAtAll3•48m ago•0 comments

NodeJAX

https://github.com/EelcoHoogendoorn/nodejax
1•sva_•49m ago•0 comments