From a77376a1fe451c084c5ec703fca0433d3651b578 Mon Sep 17 00:00:00 2001 From: Johannes M Dieterich Date: Sat, 1 Apr 2017 17:58:59 +0000 Subject: new port: java/lightweight-java-profiler A port of the lightweight-java-profiler (ljp). ljp acts as a bare-bones agentlib to produce profiling stacks that can be digested, e.g., by Brendan Gregg's flamegraph scripts. Reviewed by: mat, swills (mentor) Approved by: swills (mentor) Differential Revision: https://reviews.freebsd.org/D10194 --- .../files/patch-src_globals.h | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 java/lightweight-java-profiler/files/patch-src_globals.h (limited to 'java/lightweight-java-profiler/files/patch-src_globals.h') diff --git a/java/lightweight-java-profiler/files/patch-src_globals.h b/java/lightweight-java-profiler/files/patch-src_globals.h new file mode 100644 index 000000000000..fd9eb3a9e977 --- /dev/null +++ b/java/lightweight-java-profiler/files/patch-src_globals.h @@ -0,0 +1,23 @@ +--- src/globals.h.orig 2015-04-15 08:00:23 UTC ++++ src/globals.h +@@ -179,18 +179,13 @@ class Accessors { + #endif + }; + +-#if defined(__GNUC__) && (defined(i386) || defined(__x86_64)) + #if defined(__x86_64__) + #define __CAS_INSTR "lock; cmpxchgq %1,%2" + #define __ADD_INSTR "lock; xaddq %0,%1" +-#else // defined(__x86_64__) ++#else + #define __CAS_INSTR "lock; cmpxchgl %1,%2" + #define __ADD_INSTR "lock; xaddl %0,%1" +-#endif // defined(__x86_64__) +-#else // defined(__GNUC__) && (defined(i386) || defined(__x86_64)) +-#error \ +- "Cannot compile with non-x86. Add support for atomic ops, if you want it" +-#endif // defined(__GNUC__) && (defined(i386) || defined(__x86_64)) ++#endif + + inline intptr_t NoBarrier_CompareAndSwap(volatile intptr_t *ptr, + intptr_t old_value, -- cgit v1.2.3