src/hotspot/share/utilities/decoder.hpp
changeset 48975 2c35fd3c5789
parent 47666 19219ec3f176
child 52448 bc5c7f63dbae
--- a/src/hotspot/share/utilities/decoder.hpp	Wed Feb 14 16:42:00 2018 +0100
+++ b/src/hotspot/share/utilities/decoder.hpp	Wed Feb 14 17:20:59 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. 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
@@ -33,12 +33,10 @@
 
 class AbstractDecoder : public CHeapObj<mtInternal> {
 public:
-  virtual ~AbstractDecoder() {}
-
   // status code for decoding native C frame
   enum decoder_status {
          not_available = -10,  // real decoder is not available
-         no_error = 0,         // successfully decoded frames
+         no_error = 0,         // no error encountered
          out_of_memory,        // out of memory
          file_invalid,         // invalid elf file
          file_not_found,       // could not found symbol file (on windows), such as jvm.pdb or jvm.map
@@ -46,6 +44,12 @@
          helper_init_error     // SymInitialize failed (Windows only)
   };
 
+protected:
+  decoder_status  _decoder_status;
+
+public:
+  virtual ~AbstractDecoder() {}
+
   // decode an pc address to corresponding function name and an offset from the beginning of
   // the function
   //
@@ -68,11 +72,8 @@
   }
 
   static bool is_error(decoder_status status) {
-    return (status > 0);
+    return (status > no_error);
   }
-
-protected:
-  decoder_status  _decoder_status;
 };
 
 // Do nothing decoder
@@ -96,10 +97,8 @@
   virtual bool demangle(const char* symbol, char* buf, int buflen) {
     return false;
   }
-
 };
 
-
 class Decoder : AllStatic {
 public:
   static bool decode(address pc, char* buf, int buflen, int* offset, const char* modulepath = NULL, bool demangle = true);