Skip to content

Commit fa514ce

Browse files
committed
Rebuild the directory.
1 parent 947aa1a commit fa514ce

8 files changed

Lines changed: 63 additions & 45 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ jobs:
2626
matrix:
2727
arch: [x64, arm64]
2828
preset: [
29-
"linux-clang-release-asan",
30-
"linux-clang-release-tsan",
29+
"linux-clang-relwithstack-asan",
30+
"linux-clang-relwithstack-tsan",
3131
"linux-gcc-release",
3232
"linux-clang-release"
3333
]
3434
exclude:
3535
- arch: arm64
36-
preset: "linux-clang-release-asan"
36+
preset: "linux-clang-relwithstack-asan"
3737
- arch: arm64
38-
preset: "linux-clang-release-tsan"
38+
preset: "linux-clang-relwithstack-tsan"
3939

4040
steps:
4141
- uses: actions/checkout@v4

CMakePresets.json

Lines changed: 41 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -179,21 +179,6 @@
179179
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
180180
},
181181

182-
{
183-
"name": "linux-clang-release-asan",
184-
"displayName": "Linux Clang Release (ASan)",
185-
"description": "Linux/WSL Clang Release,启用 Address Sanitizer",
186-
"inherits": [ "linux-clang-base", "linux-asan-base" ],
187-
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
188-
},
189-
{
190-
"name": "linux-clang-release-tsan",
191-
"displayName": "Linux Clang Release (TSan)",
192-
"description": "Linux/WSL Clang Release,启用 Thread Sanitizer",
193-
"inherits": [ "linux-clang-base", "linux-tsan-base" ],
194-
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
195-
},
196-
197182
{
198183
"name": "linux-clang-debug",
199184
"displayName": "Linux Clang Debug",
@@ -205,8 +190,40 @@
205190
"displayName": "Linux Clang Release",
206191
"inherits": "linux-clang-base",
207192
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
193+
},
194+
{
195+
"name": "linux-clang-relwithstack",
196+
"displayName": "Linux Clang RelWithPerf ",
197+
"description": "Release 优化级别,但保留调试符号和完整的调用堆栈。",
198+
"inherits": "linux-clang-base",
199+
"cacheVariables": {
200+
"CMAKE_BUILD_TYPE": "Release",
201+
"CMAKE_CXX_FLAGS": "-O3 -g -fno-omit-frame-pointer $env{CMAKE_CXX_FLAGS}",
202+
"CMAKE_C_FLAGS": "-O3 -g -fno-omit-frame-pointer $env{CMAKE_C_FLAGS}"
203+
}
204+
},
205+
{
206+
"name": "linux-clang-relwithstack-tsan",
207+
"displayName": "Linux Clang RelWithPerf (TSAN)",
208+
"description": "Release 优化级别,但保留调试符号和完整的调用堆栈,启用 Thread Sanitizer",
209+
"inherits": [ "linux-clang-base", "linux-tsan-base" ],
210+
"cacheVariables": {
211+
"CMAKE_BUILD_TYPE": "Release",
212+
"CMAKE_CXX_FLAGS": "-O3 -g -fsanitize=thread -fno-omit-frame-pointer $env{CMAKE_CXX_FLAGS}",
213+
"CMAKE_C_FLAGS": "-O3 -g -fsanitize=thread -fno-omit-frame-pointer $env{CMAKE_C_FLAGS}"
214+
}
215+
},
216+
{
217+
"name": "linux-clang-relwithstack-asan",
218+
"displayName": "Linux Clang RelWithPerf (ASAN)",
219+
"description": "Release 优化级别,但保留调试符号和完整的调用堆栈,启用 Address Sanitizer",
220+
"inherits": [ "linux-clang-base", "linux-asan-base" ],
221+
"cacheVariables": {
222+
"CMAKE_BUILD_TYPE": "Release",
223+
"CMAKE_CXX_FLAGS": "-O3 -g -fsanitize=address -fno-omit-frame-pointer $env{CMAKE_CXX_FLAGS}",
224+
"CMAKE_C_FLAGS": "-O3 -g -fsanitize=address -fno-omit-frame-pointer $env{CMAKE_C_FLAGS}"
225+
}
208226
}
209-
210227
],
211228

212229
"buildPresets": [
@@ -219,16 +236,20 @@
219236
"configurePreset": "linux-clang-release"
220237
},
221238
{
222-
"name": "linux-clang-release-asan",
223-
"configurePreset": "linux-clang-release-asan"
239+
"name": "linux-clang-relwithstack-asan",
240+
"configurePreset": "linux-clang-relwithstack-asan"
224241
},
225242
{
226-
"name": "linux-clang-release-tsan",
227-
"configurePreset": "linux-clang-release-tsan"
243+
"name": "linux-clang-relwithstack-tsan",
244+
"configurePreset": "linux-clang-relwithstack-tsan"
228245
},
229246
{
230247
"name": "msvc-x64-release",
231248
"configurePreset": "msvc-x64-release"
249+
},
250+
{
251+
"name": "linux-clang-relwithstack",
252+
"configurePreset": "linux-clang-relwithstack"
232253
}
233254
]
234255
}

benchmarks/bench_latency.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "MPSC_queue.hpp"
1+
#include "daking/MPSC_queue.hpp"
22
// #include <moodycamel/concurrentqueue.h>
33
#include <benchmark/benchmark.h>
44
#include <hdr/hdr_histogram.h>

benchmarks/bench_linearizable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "MPSC_queue.hpp"
1+
#include "daking/MPSC_queue.hpp"
22
#include <benchmark/benchmark.h>
33
#include <thread>
44
#include <vector>

benchmarks/bench_throughput.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "MPSC_queue.hpp"
1+
#include "daking/MPSC_queue.hpp"
22
// #include <moodycamel/concurrentqueue.h>
33
#include <benchmark/benchmark.h>
44
#include <thread>

examples/command_dispatcher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "../include/MPSC_queue.hpp"
1+
#include "daking/MPSC_queue.hpp"
22
#include <iostream>
33
#include <thread>
44
#include <chrono>

examples/log_system.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "../include/MPSC_queue.hpp"
1+
#include "daking/MPSC_queue.hpp"
22
#include <iostream>
33
#include <fstream>
44
#include <thread>
Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,25 @@ SOFTWARE.
3030
#define DAKING_MPSC_QUEUE_HPP
3131

3232

33-
#ifndef DAKING_NO_TSAN
34-
# if defined(__has_feature)
35-
# if __has_feature(thread_sanitizer)
36-
# include <sanitizer/tsan_interface.h>
37-
extern "C" void AnnotateBenignRaceSized(const char* f, int l, const volatile void* mem, unsigned int size, const char* desc);
38-
# define DAKING_NO_TSAN __attribute__((no_sanitize("thread")))
39-
# define DAKING_TSAN_ANNOTATE_IGNORED(mem, size, desc) AnnotateBenignRaceSized(__FILE__, __LINE__, mem, size, desc)
40-
# define DAKING_TSAN_ANNOTATE_ACQUIRE(mem) __tsan_acquire(mem)
41-
# define DAKING_TSAN_ANNOTATE_RELEASE(mem) __tsan_release(mem)
42-
# else
43-
# define DAKING_NO_TSAN
44-
# define DAKING_TSAN_ANNOTATE_IGNORED(mem, size, desc)
45-
# define DAKING_TSAN_ANNOTATE_ACQUIRE(mem)
46-
# define DAKING_TSAN_ANNOTATE_RELEASE(mem)
47-
# endif
33+
#ifndef DAKING_HAS_TSAN
34+
# if defined(__SANITIZE_THREAD__) || (defined(__has_feature) && __has_feature(thread_sanitizer))
35+
# include <sanitizer/tsan_interface.h>
36+
extern "C" {
37+
void AnnotateBenignRaceSized(const char* f, int l, const volatile void* mem, unsigned int size, const char* desc);
38+
}
39+
# define DAKING_HAS_TSAN 1
40+
# define DAKING_NO_TSAN __attribute__((no_sanitize("thread")))
41+
# define DAKING_TSAN_ANNOTATE_IGNORED(mem, size, desc) AnnotateBenignRaceSized(__FILE__, __LINE__, mem, size, desc)
42+
# define DAKING_TSAN_ANNOTATE_ACQUIRE(mem) __tsan_acquire(mem)
43+
# define DAKING_TSAN_ANNOTATE_RELEASE(mem) __tsan_release(mem)
4844
# else
45+
# define DAKING_HAS_TSAN 0
4946
# define DAKING_NO_TSAN
5047
# define DAKING_TSAN_ANNOTATE_IGNORED(mem, size, desc)
5148
# define DAKING_TSAN_ANNOTATE_ACQUIRE(mem)
5249
# define DAKING_TSAN_ANNOTATE_RELEASE(mem)
5350
# endif
54-
#endif // !DAKING_NO_TSAN
51+
#endif // !DAKING_HAS_TSAN
5552

5653

5754
#ifndef DAKING_HAS_CXX20_OR_ABOVE

0 commit comments

Comments
 (0)