mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Eliminate some compiler warnings
This commit is contained in:
@ -37,6 +37,7 @@
|
||||
|
||||
#include "binfile.h"
|
||||
#include "elfparser.h"
|
||||
#include "util.h"
|
||||
|
||||
struct bin_file_t
|
||||
{
|
||||
@ -439,7 +440,7 @@ bin_file_check_inode (bin_file_t *bin_file,
|
||||
|
||||
if (!bin_file->inode_check)
|
||||
{
|
||||
g_print ("warning: Inode mismatch for %s (disk: %lld, memory: %lld)\n",
|
||||
g_print ("warning: Inode mismatch for %s (disk: "FMT64", memory: "FMT64")\n",
|
||||
bin_file->filename,
|
||||
(guint64)bin_file->inode, (guint64)inode);
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#include "tracker.h"
|
||||
|
||||
#include "perf_counter.h"
|
||||
#include "barrier.h"
|
||||
#include "util.h"
|
||||
|
||||
#define d_print(...)
|
||||
|
||||
@ -262,7 +262,7 @@ on_read (gpointer data)
|
||||
|
||||
if (head < tail)
|
||||
{
|
||||
g_warning ("sysprof fails at ring buffers (head %llu, tail %llu\n", head, tail);
|
||||
g_warning ("sysprof fails at ring buffers (head "FMT64", tail "FMT64"\n", head, tail);
|
||||
|
||||
tail = head;
|
||||
}
|
||||
|
||||
@ -34,7 +34,6 @@ int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
ElfParser *elf;
|
||||
int i;
|
||||
const char *build_id;
|
||||
const char *filename;
|
||||
|
||||
|
||||
17
unwind.c
17
unwind.c
@ -1,5 +1,6 @@
|
||||
#include "elfparser.h"
|
||||
#include <string.h>
|
||||
#include "util.h"
|
||||
|
||||
/* Pointer encodings, from dwarf2.h. */
|
||||
typedef enum
|
||||
@ -131,7 +132,7 @@ decode_instruction (const guchar **data)
|
||||
else if (high2 == 0x02)
|
||||
{
|
||||
g_print ("register: %d\n", low6);
|
||||
g_print ("offset: %llu\n", decode_uleb128 (data));
|
||||
g_print ("offset: "FMT64"\n", decode_uleb128 (data));
|
||||
|
||||
return "DW_CFA_offset";
|
||||
}
|
||||
@ -193,8 +194,8 @@ decode_instruction (const guchar **data)
|
||||
return "DW_CFA_restore_state";
|
||||
|
||||
case 0x0c:
|
||||
g_print ("reg: %llu\n", decode_uleb128 (data));
|
||||
g_print ("off: %llu\n", decode_uleb128 (data));
|
||||
g_print ("reg: "FMT64"\n", decode_uleb128 (data));
|
||||
g_print ("off: "FMT64"\n", decode_uleb128 (data));
|
||||
return "DW_CFA_def_cfa";
|
||||
|
||||
case 0x0d:
|
||||
@ -266,7 +267,7 @@ decode_cie (const guchar **data, const guchar *end)
|
||||
{
|
||||
gboolean has_augmentation;
|
||||
guint64 aug_len;
|
||||
char *augmentation;
|
||||
const char *augmentation;
|
||||
CIE *cie;
|
||||
int i, field;
|
||||
|
||||
@ -276,11 +277,11 @@ decode_cie (const guchar **data, const guchar *end)
|
||||
|
||||
*data += strlen (*data) + 1;
|
||||
|
||||
g_print ("code alignment: %llu\n", decode_uleb128 (data));
|
||||
g_print ("code alignment: "FMT64"\n", decode_uleb128 (data));
|
||||
|
||||
g_print ("data alignment: %lld\n", decode_sleb128 (data));
|
||||
|
||||
g_print ("return register: %llu\n", decode_uleb128 (data));
|
||||
g_print ("return register: "FMT64"\n", decode_uleb128 (data));
|
||||
|
||||
g_print ("augmentation: %s\n", augmentation);
|
||||
|
||||
@ -288,7 +289,7 @@ decode_cie (const guchar **data, const guchar *end)
|
||||
{
|
||||
aug_len = decode_uleb128 (data);
|
||||
|
||||
g_print ("len: %llu\n", aug_len);
|
||||
g_print ("len: "FMT64"\n", aug_len);
|
||||
|
||||
for (i = 1; augmentation[i] != 0; ++i)
|
||||
{
|
||||
@ -334,7 +335,7 @@ decode_entry (const guchar **data, gboolean eh_frame)
|
||||
|
||||
end = *data + len;
|
||||
|
||||
g_print ("length: %llu\n", len);
|
||||
g_print ("length: "FMT64"\n", len);
|
||||
|
||||
/* CIE_id is 0 for eh frames, and 0xffffffff/0xffffffffffffffff for .debug_frame */
|
||||
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
#define FMT64 "%"G_GUINT64_FORMAT
|
||||
|
||||
#if defined(__i386__)
|
||||
#define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
|
||||
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
|
||||
@ -31,3 +36,5 @@
|
||||
#define rmb() asm volatile("" ::: "memory")
|
||||
#define cpu_relax() asm volatile("" ::: "memory");
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user