Skip to content

Commit

Permalink
2010-02-13 Zoltan Varga <vargaz@gmail.com>
Browse files Browse the repository at this point in the history
	* mono-profiler-aot.c (output_image): Emit method names instead of tokens so
	the info can be used for different versions of the same assembly. Don't append
	the assembly guid to the file names.

svn path=/branches/mono-2-6/mono/; revision=151698
  • Loading branch information
vargaz committed Feb 13, 2010
1 parent 9630028 commit e2e827d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions mono/profiler/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2010-02-13 Zoltan Varga <vargaz@gmail.com>

* mono-profiler-aot.c (output_image): Emit method names instead of tokens so
the info can be used for different versions of the same assembly. Don't append
the assembly guid to the file names.

2010-01-11 Zoltan Varga <vargaz@gmail.com>

* mono-profiler-logging.c (_ProfilerFileWriteBuffer): Use MONO_ZERO_LEN_ARRAY.
Expand Down
9 changes: 6 additions & 3 deletions mono/profiler/mono-profiler-aot.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@ foreach_method (gpointer data, gpointer user_data)
{
ForeachData *udata = (ForeachData*)user_data;
MonoMethod *method = (MonoMethod*)data;
char *name;

if (!mono_method_get_token (method) || mono_class_get_image (mono_method_get_class (method)) != udata->image)
return;

fprintf (udata->outfile, "%d\n", mono_method_get_token (method));
name = mono_method_full_name (method, TRUE);
fprintf (udata->outfile, "%s\n", name);
g_free (name);
}

static void
Expand Down Expand Up @@ -75,7 +78,7 @@ output_image (gpointer key, gpointer value, gpointer user_data)

i = 0;
while (TRUE) {
outfile_name = g_strdup_printf ("%s/%s-%s-%d", tmp, mono_image_get_name (image), mono_image_get_guid (image), i);
outfile_name = g_strdup_printf ("%s/%s-%d", tmp, mono_image_get_name (image), i);

if (!g_file_test (outfile_name, G_FILE_TEST_IS_REGULAR))
break;
Expand All @@ -88,7 +91,7 @@ output_image (gpointer key, gpointer value, gpointer user_data)
outfile = fopen (outfile_name, "w+");
g_assert (outfile);

fprintf (outfile, "#VER:%d\n", 1);
fprintf (outfile, "#VER:%d\n", 2);

data.prof = prof;
data.outfile = outfile;
Expand Down

0 comments on commit e2e827d

Please sign in to comment.