hotspot/src/share/vm/asm/codeBuffer.hpp
changeset 31599 f1b42743d3ee
parent 29193 3ede621e9262
child 31620 53be635ad49c
--- a/hotspot/src/share/vm/asm/codeBuffer.hpp	Wed Jun 24 13:38:01 2015 +0200
+++ b/hotspot/src/share/vm/asm/codeBuffer.hpp	Thu Jun 25 08:17:52 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -249,6 +249,7 @@
   // Becomes true after copy-out, forbids further use.
   bool _defunct; // Zero bit pattern is "valid", see memset call in decode_env::decode_env
 #endif
+  static const char* _prefix; // defaults to " ;; "
 #endif
 
   CodeString* find(intptr_t offset) const;
@@ -289,13 +290,20 @@
   void assign(CodeStrings& other)  PRODUCT_RETURN;
   // COPY strings from other to this; leave other valid.
   void copy(CodeStrings& other)  PRODUCT_RETURN;
+  // FREE strings; invalidate this.
   void free() PRODUCT_RETURN;
-  // Guarantee that _strings are used at most once; assign invalidates a buffer.
+  // Guarantee that _strings are used at most once; assign and free invalidate a buffer.
   inline void check_valid() const {
 #ifdef ASSERT
     assert(!_defunct, "Use of invalid CodeStrings");
 #endif
   }
+
+  static void set_prefix(const char *prefix) {
+#ifndef PRODUCT
+    _prefix = prefix;
+#endif
+  }
 };
 
 // A CodeBuffer describes a memory space into which assembly
@@ -379,6 +387,7 @@
     _oop_recorder    = NULL;
     _decode_begin    = NULL;
     _overflow_arena  = NULL;
+    _code_strings    = CodeStrings();
   }
 
   void initialize(address code_start, csize_t code_size) {