Debugging SIMD registers in VS Code Contrary to some opinions, it can be quite useful to have some visibility into what your code is doing1. Unfortunately, if you are writing x86 SIMD code (SSE or AVX), the support provided by gdb and lldb is not so great. For starters, each SIMD register can be divided into multiple lanes. For example, a 128-bit wide register can be divided the following way:| Posts on wolf@nereid.pl
The previous post about Tracy was quite interesting to some people. Let’s build on that and look at some more fascinating details. This time, we will take a tour of various internal systems to understand how data is processed to be presented to users. Client side Link to heading All of the events that Tracy displays come from the profiled application. So it seems reasonable to begin our journey by looking at what happens with the markup you insert into your program. How it is transformed in...| Posts on wolf@nereid.pl
You are probably wondering if the title is clickbait. It is not. Check out the short video clip below for a pretty convincing demo. The speedup1 is highly dependent on the data, and for the two traces shown it is 33× and 22×. But 30× is a nice round number, and it is in the range of what you can reasonably expect here. How is this possible? (tl;dr version) Link to heading We can use Tracy to profile itself2 to be able to easily see where the change is. Here’s what happened before: And he...| Posts on wolf@nereid.pl
Back in 2008 or 2009, when my company was still using SVN, I said, “Hey, let’s see how this Git thing works out”. Even with my small team sharing patches via email or manually running git-daemon on development machines, it worked very well. No one complained, people actually liked the more decoupled workflow. To make things official, we went to the IT department and asked them to set up a “central” Git repository for us to work with. At that time the VCS landscape was still very muc...| Posts on wolf@nereid.pl
The setup Link to heading Let’s say you are shopping for a laptop and want to install Linux. I don’t know, maybe because Windows 11 shell is a complete disaster and WSL2 I/O performance on NTFS is making you consider doing gardening instead for the rest of your life. Linux couldn’t possibly be any worse, right? Right? Let’s say you did your research, and the laptop you chose is reasonably well-supported hardware-wise. I mean, the year is 2022, but you still have to check if there are ...| Posts on wolf@nereid.pl
Note: I posted a short version of this on Twitter some time ago. Let’s make it permanent here. One of the tasks a sampling code profiler will typically do is capturing stack traces at various points of program execution. Due to the random nature of sampling, you can’t expect to only get samples from your program. Some samples will be from within the kernel. In some cases, most samples will originate in the kernel due to the specifics of a workload. Capturing stack traces on Linux is done ...| Posts on wolf@nereid.pl
Year of the Linux Desktop Link to heading It will come soon; we just have to wait. Everything will be free there, everything will be fantastic. We’ll probably not even have to die. – Yegor Letov So, I wanted to make my Linux machine genuinely secure. I mean that even if someone gains physical access to the hardware, there must be no possibility of accessing the data and secrets stored on the disk. The usual solution is to employ at-rest disk encryption 1. This provides some security2, but...| Posts on wolf@nereid.pl
The zoo of recordable disc chemistry Why bother? Link to heading I like archiving. It gives me access to data that is no longer available on the internet. Like that obscure web page with the knowledge that would otherwise be lost to time. It also gives me access to data that was never there. Like that high-school video that everybody completely forgot about, and now you have the only copy left. But how should the data be archived? On what physical medium? After all, there is no point in archi...| Posts on wolf@nereid.pl
I want to view a picture of a funny cat I found on the web. How hard can it be?| wolf@nereid.pl