[m-dev.] for review: bootstrap hlc.gc.memprof grade
Peter Ross
peter.ross at miscrit.be
Thu Aug 10 01:28:28 AEST 2000
On Tue, Aug 08, 2000 at 06:10:43PM +1000, Fergus Henderson wrote:
> On 02-Aug-2000, Peter Ross <peter.ross at miscrit.be> wrote:
> > +++ runtime/mercury_prof.c 2000/08/02 13:51:50
> > @@ -101,7 +101,7 @@
> >
> >
> > #ifdef PROFILE_CALLS
> > - static FILE *decl_fptr = NULL;
> > + FILE *decl_fptr = NULL;
>
> If you want to give that external linkage, then its name
> should start with `MR_'.
>
> Also it would be clearer to name that `MR_prof_decl_fptr'
> rather than `MR_decl_fptr'.
>
> > Index: runtime/mercury_prof.h
> > +/*
> > +** A pointer to the "Prof.Decl" file.
> > +*/
> > +#ifdef PROFILE_CALLS
> > + extern FILE *decl_fptr;
> > +#endif
>
> Likewise here.
>
> > Index: runtime/mercury_wrapper.c
> > +#ifdef PROFILE_CALLS
> > + fclose(decl_fptr);
> > +#endif
>
> And here.
>
===================================================================
Estimated hours taken: 0.2
mercury_prof.c:
mercury_prof.h:
mercury_wrapper.c:
s/decl_fptr/MR_prof_decl_fptr/g
Index: mercury_prof.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_prof.c,v
retrieving revision 1.10
diff -u -r1.10 mercury_prof.c
--- mercury_prof.c 2000/08/03 06:18:51 1.10
+++ mercury_prof.c 2000/08/09 15:27:09
@@ -101,7 +101,7 @@
#ifdef PROFILE_CALLS
- FILE *decl_fptr = NULL;
+ FILE *MR_prof_decl_fptr = NULL;
static prof_call_node *addr_pair_table[CALL_TABLE_SIZE] = {NULL};
#endif
@@ -469,10 +469,10 @@
void
MR_prof_output_addr_decl(const char *name, const MR_Code *address)
{
- if (!decl_fptr) {
- decl_fptr = checked_fopen("Prof.Decl", "create", "w");
+ if (!MR_prof_decl_fptr) {
+ MR_prof_decl_fptr = checked_fopen("Prof.Decl", "create", "w");
}
- fprintf(decl_fptr, "%ld\t%s\n", (long) address, name);
+ fprintf(MR_prof_decl_fptr, "%ld\t%s\n", (long) address, name);
}
#endif /* PROFILE_CALLS */
@@ -619,8 +619,8 @@
#endif
#ifdef PROFILE_CALLS
- if (decl_fptr) {
- checked_fclose(decl_fptr, "Prof.Decl");
+ if (MR_prof_decl_fptr) {
+ checked_fclose(MR_prof_decl_fptr, "Prof.Decl");
}
prof_output_addr_pair_table();
#endif
Index: mercury_prof.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_prof.h,v
retrieving revision 1.7
diff -u -r1.7 mercury_prof.h
--- mercury_prof.h 2000/08/04 10:46:18 1.7
+++ mercury_prof.h 2000/08/09 15:27:09
@@ -28,7 +28,7 @@
** A pointer to the "Prof.Decl" file.
*/
#ifdef PROFILE_CALLS
- extern FILE *decl_fptr;
+ extern FILE *MR_prof_decl_fptr;
#endif
/*
Index: mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.65
diff -u -r1.65 mercury_wrapper.c
--- mercury_wrapper.c 2000/08/03 06:19:05 1.65
+++ mercury_wrapper.c 2000/08/09 15:27:10
@@ -425,7 +425,7 @@
}
#ifdef PROFILE_CALLS
- fclose(decl_fptr);
+ fclose(MR_prof_decl_fptr);
#endif
}
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list