Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/idealGraphPrinter.cpp @ 6197:d2a62e0f25eb
6995781: Native Memory Tracking (Phase 1)
7151532: DCmd for hotspot native memory tracking
Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd
Reviewed-by: acorn, coleenp, fparain
author | zgu |
---|---|
date | Thu, 28 Jun 2012 17:03:16 -0400 |
parents | f03a3c8bd5e5 |
children | 6c5b7a6becc8 |
comparison
equal
deleted
inserted
replaced
6174:74533f63b116 | 6197:d2a62e0f25eb |
---|---|
128 st.write(PrintIdealGraphFile, dot - PrintIdealGraphFile); | 128 st.write(PrintIdealGraphFile, dot - PrintIdealGraphFile); |
129 st.print("%d%s", _file_count, dot); | 129 st.print("%d%s", _file_count, dot); |
130 } else { | 130 } else { |
131 st.print("%s%d", PrintIdealGraphFile, _file_count); | 131 st.print("%s%d", PrintIdealGraphFile, _file_count); |
132 } | 132 } |
133 fileStream *stream = new (ResourceObj::C_HEAP) fileStream(st.as_string()); | 133 fileStream *stream = new (ResourceObj::C_HEAP, mtCompiler) fileStream(st.as_string()); |
134 _output = stream; | 134 _output = stream; |
135 } else { | 135 } else { |
136 fileStream *stream = new (ResourceObj::C_HEAP) fileStream(PrintIdealGraphFile); | 136 fileStream *stream = new (ResourceObj::C_HEAP, mtCompiler) fileStream(PrintIdealGraphFile); |
137 _output = stream; | 137 _output = stream; |
138 } | 138 } |
139 _file_count++; | 139 _file_count++; |
140 } else { | 140 } else { |
141 _stream = new (ResourceObj::C_HEAP) networkStream(); | 141 _stream = new (ResourceObj::C_HEAP, mtCompiler) networkStream(); |
142 | 142 |
143 // Try to connect to visualizer | 143 // Try to connect to visualizer |
144 if (_stream->connect(PrintIdealGraphAddress, PrintIdealGraphPort)) { | 144 if (_stream->connect(PrintIdealGraphAddress, PrintIdealGraphPort)) { |
145 char c = 0; | 145 char c = 0; |
146 _stream->read(&c, 1); | 146 _stream->read(&c, 1); |
158 fatal(err_msg("Couldn't connect to visualizer at %s:%d", | 158 fatal(err_msg("Couldn't connect to visualizer at %s:%d", |
159 PrintIdealGraphAddress, PrintIdealGraphPort)); | 159 PrintIdealGraphAddress, PrintIdealGraphPort)); |
160 } | 160 } |
161 } | 161 } |
162 | 162 |
163 _xml = new (ResourceObj::C_HEAP) xmlStream(_output); | 163 _xml = new (ResourceObj::C_HEAP, mtCompiler) xmlStream(_output); |
164 | 164 |
165 head(TOP_ELEMENT); | 165 head(TOP_ELEMENT); |
166 } | 166 } |
167 | 167 |
168 // Destructor, close file or network stream | 168 // Destructor, close file or network stream |