Mercurial > hg > graal-jvmci-8
comparison src/share/vm/compiler/compileLog.cpp @ 9088:89e4d67fdd2a
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 12 Apr 2013 14:05:42 +0200 |
parents | cc32ccaaf47f |
children | 813f26e34135 |
comparison
equal
deleted
inserted
replaced
9037:b008f40b67d0 | 9088:89e4d67fdd2a |
---|---|
57 delete _out; | 57 delete _out; |
58 _out = NULL; | 58 _out = NULL; |
59 FREE_C_HEAP_ARRAY(char, _identities, mtCompiler); | 59 FREE_C_HEAP_ARRAY(char, _identities, mtCompiler); |
60 } | 60 } |
61 | 61 |
62 | |
63 // Advance kind up to a null or space, return this tail. | |
64 // Make sure kind is null-terminated, not space-terminated. | |
65 // Use the buffer if necessary. | |
66 static const char* split_attrs(const char* &kind, char* buffer) { | |
67 const char* attrs = strchr(kind, ' '); | |
68 // Tease apart the first word from the rest: | |
69 if (attrs == NULL) { | |
70 return ""; // no attrs, no split | |
71 } else if (kind == buffer) { | |
72 ((char*) attrs)[-1] = 0; | |
73 return attrs; | |
74 } else { | |
75 // park it in the buffer, so we can put a null on the end | |
76 assert(!(kind >= buffer && kind < buffer+100), "not obviously in buffer"); | |
77 int klen = attrs - kind; | |
78 strncpy(buffer, kind, klen); | |
79 buffer[klen] = 0; | |
80 kind = buffer; // return by reference | |
81 return attrs; | |
82 } | |
83 } | |
84 | 62 |
85 // see_tag, pop_tag: Override the default do-nothing methods on xmlStream. | 63 // see_tag, pop_tag: Override the default do-nothing methods on xmlStream. |
86 // These methods provide a hook for managing the the extra context markup. | 64 // These methods provide a hook for managing the the extra context markup. |
87 void CompileLog::see_tag(const char* tag, bool push) { | 65 void CompileLog::see_tag(const char* tag, bool push) { |
88 if (_context.size() > 0 && _out != NULL) { | 66 if (_context.size() > 0 && _out != NULL) { |