< prev index next >

src/hotspot/os/aix/porting_aix.cpp

Print this page
rev 53569 : 8218136: minor hotspot adjustments for xlclang++ from xlc16 on AIX

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2012, 2013 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 2019 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -32,11 +32,19 @@
 #include "runtime/os.hpp"
 #include "runtime/thread.hpp"
 #include "utilities/align.hpp"
 #include "utilities/debug.hpp"
 
+// distinguish old xlc and xlclang++, where
+// <ibmdemangle.h> is suggested but not found
+#if defined(__clang__)
+#define DISABLE_DEMANGLE
+// #include <ibmdemangle.h>
+#else
 #include <demangle.h>
+#endif
+
 #include <sys/debug.h>
 #include <pthread.h>
 #include <ucontext.h>
 
 //////////////////////////////////

@@ -235,10 +243,11 @@
         i++;
       }
       p_name[i] = '\0';
 
       // If it is a C++ name, try and demangle it using the Demangle interface (see demangle.h).
+#ifndef DISABLE_DEMANGLE
       if (demangle) {
         char* rest;
         Name* const name = Demangle(p_name, rest);
         if (name) {
           const char* const demangled_name = name->Text();

@@ -247,10 +256,11 @@
             p_name[namelen-1] = '\0';
           }
           delete name;
         }
       }
+#endif
     } else {
       strncpy(p_name, "<nameless function>", namelen-1);
       p_name[namelen-1] = '\0';
     }
   }
< prev index next >