mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
This is a major redesign a modernization of Sysprof. The core data structures and design are largely the same, but it has been ported to Gtk3 and has lots of additions that should make your profiling experience smoother. Especially for those that are new to profiling. There are some very simple help docs added, but we really need the experts to come in and write some documentation here.
33 lines
761 B
C
33 lines
761 B
C
#ifndef SP_UTIL_H
|
|
#define SP_UTIL_H
|
|
|
|
#if defined(__i386__)
|
|
#define read_barrier() asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
|
|
#endif
|
|
|
|
#if defined(__x86_64__)
|
|
#define read_barrier() asm volatile("lfence" ::: "memory")
|
|
#endif
|
|
|
|
#ifdef __powerpc__
|
|
#define read_barrier() asm volatile ("sync" ::: "memory")
|
|
#endif
|
|
|
|
#ifdef __s390__
|
|
#define read_barrier() asm volatile("bcr 15,0" ::: "memory")
|
|
#endif
|
|
|
|
#ifdef __sh__
|
|
#if defined(__SH4A__) || defined(__SH5__)
|
|
# define read_barrier() asm volatile("synco" ::: "memory")
|
|
#else
|
|
# define read_barrier() asm volatile("" ::: "memory")
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef __hppa__
|
|
#define read_barrier() asm volatile("" ::: "memory")
|
|
#endif
|
|
|
|
#endif /* SP_UTIL_H */
|