Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkubouch <kubouch@gmail.com>2020-07-04 21:47:49 +0300
committerkubouch <kubouch@gmail.com>2020-07-11 12:26:01 +0300
commit1fd1d3bd6b6458faacc0f1a41040c0ca6e0e873d (patch)
treee708e4b9bad35afa5679ec5df5b76574a579173b /csvexport/build
parent0977952bde30bf0a0d31a93d8dacb9b952df64b8 (diff)
Add CSV export of basic zone statistics
Diffstat (limited to 'csvexport/build')
-rw-r--r--csvexport/build/unix/Makefile12
-rw-r--r--csvexport/build/unix/build.mk60
-rw-r--r--csvexport/build/unix/debug.mk11
-rw-r--r--csvexport/build/unix/release.mk7
-rw-r--r--csvexport/build/win32/csvexport.vcxproj37
5 files changed, 127 insertions, 0 deletions
diff --git a/csvexport/build/unix/Makefile b/csvexport/build/unix/Makefile
new file mode 100644
index 00000000..3b50301c
--- /dev/null
+++ b/csvexport/build/unix/Makefile
@@ -0,0 +1,12 @@
+all: debug
+
+debug:
+ @+make -f debug.mk all
+
+release:
+ @+make -f release.mk all
+
+clean:
+ @+make -f build.mk clean
+
+.PHONY: all clean debug release
diff --git a/csvexport/build/unix/build.mk b/csvexport/build/unix/build.mk
new file mode 100644
index 00000000..a7a67460
--- /dev/null
+++ b/csvexport/build/unix/build.mk
@@ -0,0 +1,60 @@
+CFLAGS +=
+CXXFLAGS := $(CFLAGS) -std=gnu++17
+# DEFINES += -DTRACY_NO_STATISTICS
+INCLUDES := $(shell pkg-config --cflags capstone)
+LIBS := $(shell pkg-config --libs capstone) -lpthread
+PROJECT := csvexport
+IMAGE := $(PROJECT)-$(BUILD)
+
+FILTER :=
+
+BASE := $(shell egrep 'ClCompile.*cpp"' ../win32/$(PROJECT).vcxproj | sed -e 's/.*\"\(.*\)\".*/\1/' | sed -e 's@\\@/@g')
+BASE2 := $(shell egrep 'ClCompile.*c"' ../win32/$(PROJECT).vcxproj | sed -e 's/.*\"\(.*\)\".*/\1/' | sed -e 's@\\@/@g')
+
+SRC := $(filter-out $(FILTER),$(BASE))
+SRC2 := $(filter-out $(FILTER),$(BASE2))
+
+TBB := $(shell ld -ltbb -o /dev/null 2>/dev/null; echo $$?)
+ifeq ($(TBB),0)
+ LIBS += -ltbb
+endif
+
+OBJDIRBASE := obj/$(BUILD)
+OBJDIR := $(OBJDIRBASE)/o/o/o
+
+OBJ := $(addprefix $(OBJDIR)/,$(SRC:%.cpp=%.o))
+OBJ2 := $(addprefix $(OBJDIR)/,$(SRC2:%.c=%.o))
+
+all: $(IMAGE)
+
+$(OBJDIR)/%.o: %.cpp
+ $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DEFINES) $< -o $@
+
+$(OBJDIR)/%.d : %.cpp
+ @echo Resolving dependencies of $<
+ @mkdir -p $(@D)
+ @$(CXX) -MM $(INCLUDES) $(CXXFLAGS) $(DEFINES) $< > $@.$$$$; \
+ sed 's,.*\.o[ :]*,$(OBJDIR)/$(<:.cpp=.o) $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
+$(OBJDIR)/%.o: %.c
+ $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
+
+$(OBJDIR)/%.d : %.c
+ @echo Resolving dependencies of $<
+ @mkdir -p $(@D)
+ @$(CC) -MM $(INCLUDES) $(CFLAGS) $(DEFINES) $< > $@.$$$$; \
+ sed 's,.*\.o[ :]*,$(OBJDIR)/$(<:.c=.o) $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
+$(IMAGE): $(OBJ) $(OBJ2)
+ $(CXX) $(CXXFLAGS) $(DEFINES) $(OBJ) $(OBJ2) $(LIBS) -o $@
+
+ifneq "$(MAKECMDGOALS)" "clean"
+-include $(addprefix $(OBJDIR)/,$(SRC:.cpp=.d)) $(addprefix $(OBJDIR)/,$(SRC2:.c=.d))
+endif
+
+clean:
+ rm -rf $(OBJDIRBASE) $(IMAGE)*
+
+.PHONY: clean all
diff --git a/csvexport/build/unix/debug.mk b/csvexport/build/unix/debug.mk
new file mode 100644
index 00000000..04d925a6
--- /dev/null
+++ b/csvexport/build/unix/debug.mk
@@ -0,0 +1,11 @@
+ARCH := $(shell uname -m)
+
+CFLAGS := -g3 -Wall
+DEFINES := -DDEBUG
+BUILD := debug
+
+ifeq ($(ARCH),x86_64)
+CFLAGS += -msse4.1
+endif
+
+include build.mk
diff --git a/csvexport/build/unix/release.mk b/csvexport/build/unix/release.mk
new file mode 100644
index 00000000..b59abd5c
--- /dev/null
+++ b/csvexport/build/unix/release.mk
@@ -0,0 +1,7 @@
+ARCH := $(shell uname -m)
+
+CFLAGS := -O3 -s -march=native
+DEFINES := -DNDEBUG
+BUILD := release
+
+include build.mk
diff --git a/csvexport/build/win32/csvexport.vcxproj b/csvexport/build/win32/csvexport.vcxproj
new file mode 100644
index 00000000..87c3cfe2
--- /dev/null
+++ b/csvexport/build/win32/csvexport.vcxproj
@@ -0,0 +1,37 @@
+<ClCompile Include="..\..\..\common\TracySocket.cpp" />
+<ClCompile Include="..\..\..\common\TracySystem.cpp" />
+<ClCompile Include="..\..\..\common\tracy_lz4.cpp" />
+<ClCompile Include="..\..\..\common\tracy_lz4hc.cpp" />
+<ClCompile Include="..\..\..\server\TracyMemory.cpp" />
+<ClCompile Include="..\..\..\server\TracyMmap.cpp" />
+<ClCompile Include="..\..\..\server\TracyPrint.cpp" />
+<ClCompile Include="..\..\..\server\TracyTaskDispatch.cpp" />
+<ClCompile Include="..\..\..\server\TracyTextureCompression.cpp" />
+<ClCompile Include="..\..\..\server\TracyThreadCompress.cpp" />
+<ClCompile Include="..\..\..\server\TracyWorker.cpp" />
+<ClCompile Include="..\..\..\zstd\debug.c" />
+<ClCompile Include="..\..\..\zstd\entropy_common.c" />
+<ClCompile Include="..\..\..\zstd\error_private.c" />
+<ClCompile Include="..\..\..\zstd\fse_compress.c" />
+<ClCompile Include="..\..\..\zstd\fse_decompress.c" />
+<ClCompile Include="..\..\..\zstd\hist.c" />
+<ClCompile Include="..\..\..\zstd\huf_compress.c" />
+<ClCompile Include="..\..\..\zstd\huf_decompress.c" />
+<ClCompile Include="..\..\..\zstd\pool.c" />
+<ClCompile Include="..\..\..\zstd\threading.c" />
+<ClCompile Include="..\..\..\zstd\xxhash.c" />
+<ClCompile Include="..\..\..\zstd\zstdmt_compress.c" />
+<ClCompile Include="..\..\..\zstd\zstd_common.c" />
+<ClCompile Include="..\..\..\zstd\zstd_compress.c" />
+<ClCompile Include="..\..\..\zstd\zstd_compress_literals.c" />
+<ClCompile Include="..\..\..\zstd\zstd_compress_sequences.c" />
+<ClCompile Include="..\..\..\zstd\zstd_compress_superblock.c" />
+<ClCompile Include="..\..\..\zstd\zstd_ddict.c" />
+<ClCompile Include="..\..\..\zstd\zstd_decompress.c" />
+<ClCompile Include="..\..\..\zstd\zstd_decompress_block.c" />
+<ClCompile Include="..\..\..\zstd\zstd_double_fast.c" />
+<ClCompile Include="..\..\..\zstd\zstd_fast.c" />
+<ClCompile Include="..\..\..\zstd\zstd_lazy.c" />
+<ClCompile Include="..\..\..\zstd\zstd_ldm.c" />
+<ClCompile Include="..\..\..\zstd\zstd_opt.c" />
+<ClCompile Include="..\..\src\csvexport.cpp" />