#1 Add support for powerpc*
Merged 6 years ago by codonell. Opened 6 years ago by tuliom.
tuliom/glibc-malloc-trace-utils powerpc  into  master

Add support for powerpc*
Naveen N. Rao • 6 years ago  
file modified
+32
@@ -15,6 +15,36 @@ 

  #include "malloc.h"

  #include "mtrace.h"

  

+ #ifdef __PPC__

+ #include <sys/platform/ppc.h>

+ 

+ #define ticks_t uint64_t

+ /* Setting quick_run to 1 allows the simulator to model

+    only the allocation and deallocation accounting via

+    atomic_rss. The actual allocations are skipped.  This

+    mode is useful to verify the workload file.  */

+ #define quick_run 0

+ /* Setting record_memory_logs to 1 allows the simulator

+    to record real RSS, VM size, and ideal RSS into 3

+    log files for later analysis.  */

+ #define record_memory_logs 1

+ 

+ #if record_memory_logs

+ FILE *vmsize_file;

+ FILE *vmrss_file;

+ FILE *ideal_rss_file;

+ #endif

+ 

+ static __inline__ ticks_t rdtsc_s(void)

+ {

+   return __ppc_get_timebase();

+ }

+ 

+ #define rdtsc_e rdtsc_s

+ 

+ #else

+ 

+ 

  #if UINTPTR_MAX == 0xffffffffffffffff

  

  #define ticks_t int64_t
@@ -72,6 +102,8 @@ 

  

  #endif

  

+ #endif

+ 

  static ticks_t diff_timeval (struct timeval e, struct timeval s)

  {

    ticks_t usec;

Use POWER's timebase register to collect timing data for the simulator
via glibc's __ppc_get_timebase().

Signed-off-by: Naveen N. Rao naveen.n.rao@linux.vnet.ibm.com
Signed-off-by: Tulio Magno Quites Machado Filho tuliom@linux.ibm.com

Pull-Request has been merged by codonell

6 years ago
Metadata