Skip to content

spacestation13/byond-tracy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

byond-tracy

byond-tracy glues together a byond server with the tracy profiler allowing you to analyze and visualize proc calls

supported byond versions

windows linux
516.1667 516.1667
516.1666 516.1666
516.1665 516.1665
516.1664 516.1664
516.1663 516.1663
516.1662 516.1662
516.1661 516.1661
516.1660 516.1660
516.1659 516.1659
516.1658 516.1658
516.1657 516.1657
516.1656 516.1656
516.1655 516.1655
516.1654 N/A
516.1653 516.1653
516.1652 516.1652
516.1651 516.1651
516.1650 516.1650
516.1649 516.1649
516.1648 516.1648
515.* 515.*
514.* 514.*

except 515.1612 on Linux as there was no release

supported tracy versions

0.8.1 0.8.2 0.9.0 0.9.1 0.10.0 0.11.0 0.11.1

usage

simply call init from prof.dll to begin collecting profile data and connect using tracy-server Tracy.exe

/proc/prof_init()
	var/lib

	switch(world.system_type)
		if(MS_WINDOWS) lib = "prof.dll"
		if(UNIX) lib = "libprof.so"
		else CRASH("unsupported platform")

	var/init = call_ext(lib, "init")()
	if("0" != init) CRASH("[lib] init error: [init]")

/world/New()
	prof_init()
	. = ..()

env vars

set these env vars before launching dreamdaemon to control which node and service to bind

UTRACY_BIND_ADDRESS
UTRACY_BIND_PORT

building

You can download a precompiled byond-tracy executable from the latest release.

The Linux one is unlikely to work on your system. No guarantee or warranty given for the binaries.

no build system included, simply invoke your preferred c11 compiler. examples:

cl.exe /nologo /std:c11 /O2 /LD /DNDEBUG prof.c ws2_32.lib /Fe:prof.dll
clang.exe -std=c11 -m32 -shared -Ofast3 -DNDEBUG -fuse-ld=lld-link prof.c -lws2_32 -o prof.dll
gcc -std=c11 -m32 -shared -fPIC -Ofast -s -DNDEBUG prof.c -pthread -o libprof.so

developing

To add offsets (required for every new BYOND version), you can derive them using https://github.com/Sovexe/byond-tracy-offset-extractor.

Just run the Extract Signatures GitHub Workflow, and pass in your version like ["515.1590","515.1591"].

Ideally this just works perfectly. Go to the Run extraction script step and copy the offsets. It's already in copypaste form for the offsets/ headers.

Then just PR it and maybe ping ZeWaka in #tooling-questions to merge it.

LICENSE

BSD 2-Clause, originally forked from https://github.com/mafemergency/byond-tracy

About

analyze BYOND games in Tracy

Topics

Resources

License

Stars

Watchers

Forks

Contributors 8

Languages