11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "code/debugInfo.hpp"
27 #include "code/debugInfoRec.hpp"
28 #include "code/nmethod.hpp"
29 #include "oops/oop.inline.hpp"
30 #include "runtime/handles.inline.hpp"
31 #include "runtime/interfaceSupport.hpp"
32 #include "runtime/jniHandles.inline.hpp"
33 #include "runtime/thread.hpp"
34
35 // Constructors
36
37 DebugInfoWriteStream::DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size)
38 : CompressedWriteStream(initial_size) {
39 _recorder = recorder;
40 }
41
42 // Serializing oops
43
44 void DebugInfoWriteStream::write_handle(jobject h) {
45 write_int(recorder()->oop_recorder()->find_index(h));
46 }
47
48 void DebugInfoWriteStream::write_metadata(Metadata* h) {
49 write_int(recorder()->oop_recorder()->find_index(h));
50 }
51
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "code/debugInfo.hpp"
27 #include "code/debugInfoRec.hpp"
28 #include "code/nmethod.hpp"
29 #include "oops/oop.inline.hpp"
30 #include "runtime/handles.inline.hpp"
31 #include "runtime/interfaceSupport.inline.hpp"
32 #include "runtime/jniHandles.inline.hpp"
33 #include "runtime/thread.hpp"
34
35 // Constructors
36
37 DebugInfoWriteStream::DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size)
38 : CompressedWriteStream(initial_size) {
39 _recorder = recorder;
40 }
41
42 // Serializing oops
43
44 void DebugInfoWriteStream::write_handle(jobject h) {
45 write_int(recorder()->oop_recorder()->find_index(h));
46 }
47
48 void DebugInfoWriteStream::write_metadata(Metadata* h) {
49 write_int(recorder()->oop_recorder()->find_index(h));
50 }
51
|