blog

Personal blog
git clone git://git.laack.co/blog.git
Log | Files | Refs

commit 229a921462e263e0bcfc304f8410da039e713c69
parent 15c03d3447bf4f7dcedce0808dbf53e16e23ac6d
Author: Andrew Laack <andrew@laack.co>
Date:   Sun, 11 Oct 2026 11:27:24 -0500

Replace tabs

Diffstat:
Mposts/wip/basic-software-profiling-cpu-usage.md | 22+++++++++++-----------
Ascripts/replace_tabs.py | 10++++++++++
2 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/posts/wip/basic-software-profiling-cpu-usage.md b/posts/wip/basic-software-profiling-cpu-usage.md @@ -142,18 +142,18 @@ perf stat ./ex1 ``` Performance counter stats for './ex1': - 0 context-switches:u # 0.0 cs/sec cs_per_second - 0 cpu-migrations:u # 0.0 migrations/sec migrations_per_second - 132 page-faults:u # 4.1 faults/sec page_faults_per_second - 32,436.48 msec task-clock:u # nan CPUs CPUs_utilized - 356,775 branch-misses:u # 0.0 % branch_miss_rate (88.89%) - 63,706,083,988 branches:u # 1964.0 M/sec branch_frequency (88.89%) - 134,126,037,336 cpu-cycles:u # 4.1 GHz cycles_frequency (88.89%) - 300,951,617,557 instructions:u # 2.2 instructions insn_per_cycle (88.89%) + 0 context-switches:u # 0.0 cs/sec cs_per_second + 0 cpu-migrations:u # 0.0 migrations/sec migrations_per_second + 132 page-faults:u # 4.1 faults/sec page_faults_per_second + 32,436.48 msec task-clock:u # nan CPUs CPUs_utilized + 356,775 branch-misses:u # 0.0 % branch_miss_rate (88.89%) + 63,706,083,988 branches:u # 1964.0 M/sec branch_frequency (88.89%) + 134,126,037,336 cpu-cycles:u # 4.1 GHz cycles_frequency (88.89%) + 300,951,617,557 instructions:u # 2.2 instructions insn_per_cycle (88.89%) TopdownL1 # 4.4 % tma_backend_bound - # 61.4 % tma_bad_speculation (88.89%) - # 0.0 % tma_frontend_bound (77.78%) - # 34.2 % tma_retiring (88.89%) + # 61.4 % tma_bad_speculation (88.89%) + # 0.0 % tma_frontend_bound (77.78%) + # 34.2 % tma_retiring (88.89%) 32.440411262 seconds time elapsed diff --git a/scripts/replace_tabs.py b/scripts/replace_tabs.py @@ -0,0 +1,10 @@ +file = input() +lines = [] + +with open(file,'r') as f: + lines = f.readlines() + +with open(file,'w') as f: + for line in lines: + line.replace('\t', " ") + f.write(line + "\n")