@@ -635,7 +635,7 @@ Compile::Compile( ciEnv* ci_env, ciMethod* target, int osr_bci,
635
635
_vector_reboxing_late_inlines(comp_arena(), 2, 0, NULL),
636
636
_late_inlines_pos(0 ),
637
637
_number_of_mh_late_inlines(0 ),
638
- _print_inlining_stream(NULL ),
638
+ _print_inlining_stream(new stringStream() ),
639
639
_print_inlining_list(NULL ),
640
640
_print_inlining_idx(0 ),
641
641
_print_inlining_output(NULL ),
@@ -908,7 +908,7 @@ Compile::Compile( ciEnv* ci_env,
908
908
_initial_gvn(NULL ),
909
909
_for_igvn(NULL ),
910
910
_number_of_mh_late_inlines(0 ),
911
- _print_inlining_stream(NULL ),
911
+ _print_inlining_stream(new stringStream() ),
912
912
_print_inlining_list(NULL ),
913
913
_print_inlining_idx(0 ),
914
914
_print_inlining_output(NULL ),
@@ -4396,13 +4396,6 @@ Node* Compile::constrained_convI2L(PhaseGVN* phase, Node* value, const TypeInt*
4396
4396
return phase->transform (new ConvI2LNode (value, ltype));
4397
4397
}
4398
4398
4399
- void Compile::print_inlining_stream_free () {
4400
- if (_print_inlining_stream != NULL ) {
4401
- _print_inlining_stream->~stringStream ();
4402
- _print_inlining_stream = NULL ;
4403
- }
4404
- }
4405
-
4406
4399
// The message about the current inlining is accumulated in
4407
4400
// _print_inlining_stream and transferred into the _print_inlining_list
4408
4401
// once we know whether inlining succeeds or not. For regular
@@ -4414,17 +4407,14 @@ void Compile::print_inlining_stream_free() {
4414
4407
void Compile::print_inlining_init () {
4415
4408
if (print_inlining () || print_intrinsics ()) {
4416
4409
// print_inlining_init is actually called several times.
4417
- print_inlining_stream_free ();
4418
- _print_inlining_stream = new stringStream ();
4410
+ print_inlining_reset ();
4419
4411
_print_inlining_list = new (comp_arena ())GrowableArray<PrintInliningBuffer*>(comp_arena (), 1 , 1 , new PrintInliningBuffer ());
4420
4412
}
4421
4413
}
4422
4414
4423
4415
void Compile::print_inlining_reinit () {
4424
4416
if (print_inlining () || print_intrinsics ()) {
4425
- print_inlining_stream_free ();
4426
- // Re allocate buffer when we change ResourceMark
4427
- _print_inlining_stream = new stringStream ();
4417
+ print_inlining_reset ();
4428
4418
}
4429
4419
}
4430
4420
@@ -4514,7 +4504,7 @@ void Compile::process_print_inlining() {
4514
4504
// It is on the arena, so it will be freed when the arena is reset.
4515
4505
_print_inlining_list = NULL ;
4516
4506
// _print_inlining_stream won't be used anymore, either.
4517
- print_inlining_stream_free ();
4507
+ print_inlining_reset ();
4518
4508
size_t end = ss.size ();
4519
4509
_print_inlining_output = NEW_ARENA_ARRAY (comp_arena (), char , end+1 );
4520
4510
strncpy (_print_inlining_output, ss.freeze (), end+1 );
0 commit comments