Skip to content

Commit

Permalink
Auto PR from release/0.6 to release/0.7 (#385)
Browse files Browse the repository at this point in the history
* Fix HTTPFSv2 using proxy (#336)

Signed-off-by: Coldwings <[email protected]>

* FIX httpfs_v2 common header for file able to replace by ioctl (#351)

FIX httpfs common header for file able to replace by ioctl

* ALog Prologue now keeps only last part of source path (filename), using us timestamps (#364)

* Fix alog namedvalue print character array

Signed-off-by: Coldwings <[email protected]>

* ALog prologue keeps only filename, uses us timestamp

Signed-off-by: Coldwings <[email protected]>

* make `update_now` returns timeval, so as `alog_update_now()`

Signed-off-by: Coldwings <[email protected]>

* Fix `make_named_value`

Signed-off-by: Coldwings <[email protected]>

* `Prologue use const char* for string instead of uint64_t

Signed-off-by: Coldwings <[email protected]>

* `prologue` with constexpr constructor

Signed-off-by: Coldwings <[email protected]>

* prevent warning for make_named_value in clang

Signed-off-by: Coldwings <[email protected]>

---------

Signed-off-by: Coldwings <[email protected]>

* fix readdir for localfs

Signed-off-by: Lanzheng Liu <[email protected]>

* Fix prologue file field length (#369)

Signed-off-by: Coldwings <[email protected]>

* Fix: make_named_tuple maked ref to temporary alogstring (#375)

Signed-off-by: Coldwings <[email protected]>

* Fix compile in gcc492 (#384)

* Fix compile in gcc492, ignore some designed warning with diagnostic pragma

Signed-off-by: Coldwings <[email protected]>

* Only add no-packed-bitfield-compat for GCC

Signed-off-by: Coldwings <[email protected]>

---------

Signed-off-by: Coldwings <[email protected]>

---------

Signed-off-by: Coldwings <[email protected]>
Signed-off-by: Lanzheng Liu <[email protected]>
Co-authored-by: Coldwings <[email protected]>
Co-authored-by: Lanzheng Liu <[email protected]>
  • Loading branch information
3 people authored Mar 1, 2024
1 parent c330145 commit 47de87b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ set(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_BUILD_PARALLEL_LEVEL ${NumCPU})

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-packed-bitfield-compat")
endif()

if (${ARCH} STREQUAL x86_64)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2")
elseif (${ARCH} STREQUAL aarch64)
Expand Down
13 changes: 7 additions & 6 deletions common/alog.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,13 @@ struct Prologue
int len_func, len_file;
int line, level;

template <size_t N, typename FILEN>
constexpr Prologue(const char (&addr_func_)[N], FILEN addr_file_, int line_,
int level_)
template <size_t N, size_t M>
constexpr Prologue(const char (&addr_func_)[N], const char (&addr_file_)[M],
int line_, int level_)
: addr_func(addr_func_),
addr_file(addr_file_.chars),
addr_file(addr_file_),
len_func(N - 1),
len_file(addr_file_.len),
len_file(M - 1),
line(line_),
level(level_) {}
};
Expand Down Expand Up @@ -456,7 +456,8 @@ struct LogBuilder {
auto _partial_file = \
ConstString::TSpliter<'/', ' ', \
decltype(_prologue_file_r)>::Current::reverse(); \
constexpr static Prologue prolog(__func__, _partial_file, __LINE__, level);
constexpr static Prologue prolog(__func__, _partial_file.chars, __LINE__, \
level);

#define _IS_LITERAL_STRING(x) \
(sizeof(#x) > 2 && (#x[0] == '"') && (#x[sizeof(#x) - 2] == '"'))
Expand Down
1 change: 0 additions & 1 deletion examples/perf/net-perf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ DEFINE_uint64(port, 9527, "port");
DEFINE_uint64(buf_size, 512, "buffer size");
DEFINE_uint64(vcpu_num, 1, "server vcpu num. Increase this value to enable multi-vcpu scheduling");

static int event_engine = 0;
static bool stop_test = false;
static uint64_t qps = 0;
static uint64_t time_cost = 0;
Expand Down
4 changes: 3 additions & 1 deletion net/http/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ class ClientImpl : public Client {
CommonHeaders<> m_common_headers;
ICookieJar *m_cookie_jar;
ClientImpl(ICookieJar *cookie_jar, TLSContext *tls_ctx) :
m_dialer(tls_ctx), m_cookie_jar(cookie_jar) { }
m_dialer(tls_ctx),
m_cookie_jar(cookie_jar) {
}

using SocketStream_ptr = std::unique_ptr<ISocketStream>;
int redirect(Operation* op) {
Expand Down
3 changes: 3 additions & 0 deletions net/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ void base64_translate_3to4(const char *in, char *out) {
static const unsigned char tbl[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
auto v = htonl(*(uint32_t *)in);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
auto x = (xlator*) &v;
#pragma GCC diagnostic pop
*(uint32_t *)out = ((tbl[x->a] << 24) + (tbl[x->b] << 16) +
(tbl[x->c] << 8) + (tbl[x->d] << 0));
}
Expand Down

0 comments on commit 47de87b

Please sign in to comment.