goMesaTracer
A tracer and analyzer for glmark2 and mesa writen in golang.
中文完整工具目的、使用见笔记。
Build Shared Library
Linux Only
mkdir build
make lib
The built shared library and header file would be in build
folder.
Install Shared Library
Linux Only
sudo make install
Simply copy the header file to
/usr/local/include/CGO/libMesaTracer.h
Copy the lib file to
/usr/local/lib/x86_64-linux-gnu/libMesaTracer.so
Make a soft link of lib to
/usr/local/lib/libMesaTracer.so
Use Shared Library
#include "CGO/libMesaTracer.h"
// When you need to add a trace
cgoAddTrace(<CgoType>);
// After the last trace
cgoStopAndWait();
CgoType
is defined in main.go
as macro definition.
Build & Run Sample Progarm
Build
cd testProgram
make
# Executable file would output to /build/test
Run
./test
# or
LD_LIBRARY_PATH=/usr/local/lib ./test
# if the shared lib can not be found
Analyze Tool
TODO