Solving some build issues
This commit is contained in:
parent
4a4bf8d98d
commit
c8706c66ec
2
Makefile
2
Makefile
|
@ -7,7 +7,7 @@
|
|||
.PHONY: clean cleandist
|
||||
|
||||
DEPSINCLUDE = -Idependencies/rapidjson/include -Idependencies/sajson/include -Idependencies/json11 -Idependencies/fastjson/src -Idependencies/fastjson/include -Idependencies/gason/src -Idependencies/ujson4c/3rdparty -Idependencies/ujson4c/src
|
||||
CXXFLAGS = -std=c++11 -march=native -Wall -Wextra -Wshadow -Iinclude -Ibenchmark/linux $(DEPSINCLUDE)
|
||||
CXXFLAGS = -std=c++17 -march=native -Wall -Wextra -Wshadow -Iinclude -Ibenchmark/linux $(DEPSINCLUDE)
|
||||
CFLAGS = -march=native -Idependencies/ujson4c/3rdparty -Idependencies/ujson4c/src
|
||||
ifeq ($(SANITIZE),1)
|
||||
CXXFLAGS += -g3 -O0 -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
|
||||
template <int TYPE = PERF_TYPE_HARDWARE> class LinuxEvents {
|
||||
int fd;
|
||||
perf_event_attr attribs;
|
||||
|
@ -37,7 +38,7 @@ public:
|
|||
|
||||
int group = -1; // no group
|
||||
num_events = config_vec.size();
|
||||
u32 i = 0;
|
||||
uint32_t i = 0;
|
||||
for (auto config : config_vec) {
|
||||
attribs.config = config;
|
||||
fd = syscall(__NR_perf_event_open, &attribs, pid, cpu, group, flags);
|
||||
|
@ -55,7 +56,7 @@ public:
|
|||
|
||||
~LinuxEvents() { close(fd); }
|
||||
|
||||
really_inline void start() {
|
||||
inline void start() {
|
||||
if (ioctl(fd, PERF_EVENT_IOC_RESET, PERF_IOC_FLAG_GROUP) == -1) {
|
||||
report_error("ioctl(PERF_EVENT_IOC_RESET)");
|
||||
}
|
||||
|
@ -65,7 +66,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
really_inline void end(std::vector<unsigned long long> &results) {
|
||||
inline void end(std::vector<unsigned long long> &results) {
|
||||
if (ioctl(fd, PERF_EVENT_IOC_DISABLE, PERF_IOC_FLAG_GROUP) == -1) {
|
||||
report_error("ioctl(PERF_EVENT_IOC_DISABLE)");
|
||||
}
|
||||
|
@ -75,7 +76,7 @@ public:
|
|||
}
|
||||
// our actual results are in slots 1,3,5, ... of this structure
|
||||
// we really should be checking our ids obtained earlier to be safe
|
||||
for (u32 i = 1; i < temp_result_vec.size(); i += 2) {
|
||||
for (uint32_t i = 1; i < temp_result_vec.size(); i += 2) {
|
||||
results[i / 2] = temp_result_vec[i];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include <string_view>
|
||||
#include "simdjson/common_defs.h"
|
||||
|
||||
|
||||
|
|
|
@ -251,7 +251,8 @@ public:
|
|||
really_inline void write_tape_double(double d) {
|
||||
write_tape(0, 'd');
|
||||
static_assert(sizeof(d) == sizeof(tape[current_loc]), "mismatch size");
|
||||
tape[current_loc++] = *((u64 *)&d);
|
||||
memcpy(& tape[current_loc++], &d, sizeof(double));
|
||||
//tape[current_loc++] = *((u64 *)&d);
|
||||
}
|
||||
|
||||
really_inline u32 get_current_loc() { return current_loc; }
|
||||
|
|
|
@ -230,7 +230,7 @@ inline void foundString(const u8 *buf, const u8 *parsed_begin,
|
|||
size_t thislen = parsed_end - parsed_begin;
|
||||
total_string_length += thislen;
|
||||
good_string++;
|
||||
char *end;
|
||||
char *end = NULL;
|
||||
char bigbuffer[4096]; // if some strings exceeds 4k, this will fail!
|
||||
if (!parse_string((const char *)buf, bigbuffer, &end)) {
|
||||
printf("WARNING: reference parser seems to think that the string is NOT "
|
||||
|
|
Loading…
Reference in New Issue