@@ -181,6 +181,7 @@ def __init__(self, vm, bm_suite, args):
181181
182182 self .base_image_build_args += self .system_properties
183183 self .bundle_path = self .get_bundle_path_if_present ()
184+ self .bundle_create_path = self .get_bundle_create_path_if_present ()
184185 if not self .bundle_path :
185186 self .base_image_build_args += self .classpath_arguments
186187 self .base_image_build_args += self .executable
@@ -189,8 +190,12 @@ def __init__(self, vm, bm_suite, args):
189190 self .base_image_build_args += ['-H:+PrintAnalysisStatistics' ]
190191 self .base_image_build_args += ['-H:+PrintCallEdges' ]
191192 self .base_image_build_args += ['-H:+CollectImageBuildStatistics' ]
193+
192194 self .image_build_reports_directory = os .path .join (self .output_dir , 'reports' )
195+ if self .bundle_create_path is not None :
196+ self .image_build_reports_directory = os .path .join (self .output_dir , self .bundle_create_path )
193197 self .image_build_stats_file = os .path .join (self .image_build_reports_directory , 'image_build_statistics.json' )
198+
194199 if vm .is_quickbuild :
195200 self .base_image_build_args += ['-Ob' ]
196201 if vm .use_string_inlining :
@@ -232,6 +237,16 @@ def get_bundle_path_if_present(self):
232237 if len (bundle_arg ) == 1 :
233238 bp = bundle_arg [0 ][len (bundle_apply_arg ):]
234239 return bp
240+
241+ return None
242+
243+ def get_bundle_create_path_if_present (self ):
244+ bundle_create_arg = "--bundle-create"
245+ bundle_arg_idx = [idx for idx , arg in enumerate (self .extra_image_build_arguments ) if arg .startswith (bundle_create_arg )]
246+ if len (bundle_arg_idx ) == 1 :
247+ bp = join (self .extra_image_build_arguments [bundle_arg_idx [0 ] + 1 ] + ".output" , "default" , "reports" )
248+ return bp
249+
235250 return None
236251
237252 def __init__ (self , name , config_name , extra_java_args = None , extra_launcher_args = None , ** kwargs ):
0 commit comments