mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-capture: Use SYSPROF_INT64_CONSTANT instead of GLib version
Same for the unsigned version. They do the same thing as the GLib versions. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #40
This commit is contained in:
@ -82,9 +82,9 @@ SYSPROF_BEGIN_DECLS
|
||||
#define SYSPROF_CAPTURE_ADDRESS_FORMAT "0x%016" G_GINT64_MODIFIER "x"
|
||||
|
||||
#if GLIB_SIZEOF_VOID_P == 8
|
||||
# define SYSPROF_CAPTURE_JITMAP_MARK G_GUINT64_CONSTANT(0xE000000000000000)
|
||||
# define SYSPROF_CAPTURE_JITMAP_MARK SYSPROF_UINT64_CONSTANT(0xE000000000000000)
|
||||
#elif GLIB_SIZEOF_VOID_P == 4
|
||||
# define SYSPROF_CAPTURE_JITMAP_MARK G_GUINT64_CONSTANT(0xE0000000)
|
||||
# define SYSPROF_CAPTURE_JITMAP_MARK SYSPROF_UINT64_CONSTANT(0xE0000000)
|
||||
#else
|
||||
#error Unknown GLIB_SIZEOF_VOID_P
|
||||
#endif
|
||||
|
||||
@ -76,9 +76,10 @@
|
||||
#include "sysprof-capture-util-private.h"
|
||||
#include "sysprof-capture-writer.h"
|
||||
#include "sysprof-macros-internal.h"
|
||||
#include "sysprof-macros.h"
|
||||
|
||||
#define DEFAULT_BUFFER_SIZE (_sysprof_getpagesize() * 64L)
|
||||
#define INVALID_ADDRESS (G_GUINT64_CONSTANT(0))
|
||||
#define INVALID_ADDRESS (SYSPROF_UINT64_CONSTANT(0))
|
||||
#define MAX_COUNTERS ((1 << 24) - 1)
|
||||
#define MAX_UNWIND_DEPTH 64
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ typedef int SysprofClock;
|
||||
typedef int64_t SysprofTimeStamp;
|
||||
typedef int32_t SysprofTimeSysprofan;
|
||||
|
||||
#define SYSPROF_NSEC_PER_SEC G_GINT64_CONSTANT(1000000000)
|
||||
#define SYSPROF_NSEC_PER_SEC SYSPROF_INT64_CONSTANT(1000000000)
|
||||
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
SysprofClock sysprof_clock;
|
||||
|
||||
@ -59,6 +59,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#if INT_MAX == LONG_MAX
|
||||
#define SYSPROF_INT64_CONSTANT(x) x##ULL
|
||||
#define SYSPROF_UINT64_CONSTANT(x) x##LL
|
||||
#else
|
||||
#define SYSPROF_INT64_CONSTANT(x) x##UL
|
||||
#define SYSPROF_UINT64_CONSTANT(x) x##L
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define SYSPROF_BEGIN_DECLS extern "C" {
|
||||
#define SYSPROF_END_DECLS }
|
||||
|
||||
Reference in New Issue
Block a user