LDC 1.25.0

Dennis dkorpel at gmail.com
Fri Feb 26 12:00:31 UTC 2021


On Friday, 26 February 2021 at 01:10:48 UTC, Mathias LANG wrote:
> If it's the regular client, then just cd to 
> https://github.com/wolfpld/tracy/tree/master/profiler/build/unix and run `make`. We use it on Linux without problem, but the profiler crashes on Mac OSX ATM.

I had to `sudo apt install libcapstone-dev`, but after that it 
worked!
So for others, my current Debian-linux setup looks like this:

```
# Go to your code folder and clone tracy:
git clone https://github.com/wolfpld/tracy

# Build the import-chrome tool
cd tracy/import-chrome/build/unix/
make
# Copy it to the /usr/bin folder so it can be invoked from 
anywhere
sudo cp import-chrome-release /usr/bin/import-chrome

# Back to the root of the repo, now build the profiler
cd ../../../
cd profiler/build/unix/
make
sudo cp Tracy-release /usr/bin/tracy
```

Now add these settings to dub.sdl (either temporarily for all 
builds, or inside a specific configuration):
```
dflags "--ftime-trace" platform="ldc"
dflags "--ftime-trace-file=./my-trace.json" platform="ldc"
postBuildCommands "import-chrome ./my-trace.json 
./my-trace.tracy" platform="ldc"

```

Then build and open the trace:
```
dub build --compiler=ldc2
tracy my-trace.tracy
```
And enjoy 60 fps!


More information about the Digitalmars-d-announce mailing list