Skip to content

Commit

Permalink
common: print SP at the beginning of log msg
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Gromadzki <[email protected]>
  • Loading branch information
grom72 committed Oct 6, 2023
1 parent 75be555 commit 3699cfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/out.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,7 @@ out_common(const char *file, int line, const char *func, int level,

char sp_txt[128];
uint64_t sp = getsp();
out_snprintf(sp_txt, 64, "SP: 0x%lX\n", sp);
Print(sp_txt);
out_snprintf(sp_txt, 64, "SP: 0x%12lX", sp);

#ifdef _WIN32
if (fmt && fmt[0] == '!' && fmt[1] == '!')
Expand All @@ -375,7 +374,7 @@ out_common(const char *file, int line, const char *func, int level,
if (f)
file = f + 1;
ret = out_snprintf(&buf[cc], MAXPRINT - cc,
"<%s>: <%d> [%s:%d %s] ",
"%s <%s>: <%d> [%s:%d %s] ", sp_txt,
Log_prefix, level, file, line, func);
if (ret < 0) {
Print("out_snprintf failed");
Expand Down
1 change: 1 addition & 0 deletions src/libpmem2/x86_64/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pmem_memmove_nodrain_static(void *dest, const void *src, size_t len, unsigned fl
{
/* suppress unused-parameter errors */
SUPPRESS_UNUSED(flushf);
LOG(15, "dest %p src %p len %zu", dest, src, len);

if (len == 0 || src == dest)
return dest;
Expand Down

0 comments on commit 3699cfe

Please sign in to comment.