char *outfile;
char *llvm_outfile;
char *data_outfile;
- char *profile_file;
+ GList *profile_files;
gboolean save_temps;
gboolean write_symbols;
gboolean metadata_only;
int objc_selector_index, objc_selector_index_2;
GPtrArray *objc_selectors;
GHashTable *objc_selector_to_index;
- ProfileData *profile_data;
+ GList *profile_data;
FILE *logfile;
FILE *instances_logfile;
FILE *data_outfile;
add_gsharedvt_wrappers (MonoAotCompile *acfg, MonoMethodSignature *sig, gboolean gsharedvt_in, gboolean gsharedvt_out);
static void
-add_profile_instances (MonoAotCompile *acfg);
+add_profile_instances (MonoAotCompile *acfg, ProfileData *data);
static void
aot_printf (MonoAotCompile *acfg, const gchar *format, ...)
} else if (str_begins_with (arg, "data-outfile=")) {
opts->data_outfile = g_strdup (arg + strlen ("data-outfile="));
} else if (str_begins_with (arg, "profile=")) {
- opts->profile_file = g_strdup (arg + strlen ("profile="));
+ opts->profile_files = g_list_append (opts->profile_files, g_strdup (arg + strlen ("profile=")));
} else if (str_begins_with (arg, "help") || str_begins_with (arg, "?")) {
printf ("Supported options for --aot:\n");
printf (" outfile=\n");
}
}
- acfg->profile_data = data;
+ acfg->profile_data = g_list_append (acfg->profile_data, data);
}
static void
* Resolve the profile data to the corresponding loaded classes/methods etc. if possible.
*/
static void
-resolve_profile_data (MonoAotCompile *acfg)
+resolve_profile_data (MonoAotCompile *acfg, ProfileData *data)
{
- ProfileData *data = acfg->profile_data;
GHashTableIter iter;
gpointer key, value;
int i;
}
static void
-add_profile_instances (MonoAotCompile *acfg)
+add_profile_instances (MonoAotCompile *acfg, ProfileData *data)
{
- ProfileData *data = acfg->profile_data;
GHashTableIter iter;
gpointer key, value;
int count = 0;
}
}
- if (acfg->aot_opts.profile_file)
- load_profile_file (acfg, acfg->aot_opts.profile_file);
+ if (acfg->aot_opts.profile_files) {
+ GList *l;
+
+ for (l = acfg->aot_opts.profile_files; l; l = l->next) {
+ load_profile_file (acfg, (char*)l->data);
+ }
+ }
{
int method_index;
if (!res)
return 1;
- resolve_profile_data (acfg);
+ {
+ GList *l;
- add_profile_instances (acfg);
+ for (l = acfg->profile_data; l; l = l->next)
+ resolve_profile_data (acfg, (ProfileData*)l->data);
+ for (l = acfg->profile_data; l; l = l->next)
+ add_profile_instances (acfg, (ProfileData*)l->data);
+ }
acfg->cfgs_size = acfg->methods->len + 32;
acfg->cfgs = g_new0 (MonoCompile*, acfg->cfgs_size);