Skip to content

Commit

Permalink
suppression de BC_PROFILE
Browse files Browse the repository at this point in the history
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1116 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information
Damien Doligez committed Oct 29, 1996
1 parent 203a408 commit 47e3b60
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 38 deletions.
2 changes: 1 addition & 1 deletion byterun/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/* We use threaded code interpretation if the compiler provides labels
as first-class values (GCC 2.x). */

#if defined(__GNUC__) && __GNUC__ >= 2 && !defined(DEBUG) && !defined(BC_PROFILE)
#if defined(__GNUC__) && __GNUC__ >= 2 && !defined(DEBUG)
#define THREADED_CODE
#endif

Expand Down
6 changes: 0 additions & 6 deletions byterun/interp.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,6 @@ value interprete(prog, prog_size)
Assert(sp >= stack_low);
Assert(sp <= stack_high);
#endif
#if BC_PROFILE
{
extern unsigned long bc_counts [];
++ bc_counts [*pc];
}
#endif /* BC_PROFILE */
switch(*pc++) {
#endif

Expand Down
31 changes: 0 additions & 31 deletions byterun/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,6 @@ int attempt_open(name, trail, do_open_script)

extern void init_ieee_floats();

#ifdef BC_PROFILE
unsigned long bc_counts [128];
void savecounts ()
{
char *countfilename = getenv ("CAML_BC_COUNTFILE");

if (countfilename != NULL){
FILE *countfile = fopen (countfilename, "w");
if (countfile != NULL){
fwrite (bc_counts, sizeof (unsigned long), 128, countfile);
}
}
}
#endif /* BC_PROFILE */

void caml_main(argc, argv)
int argc;
char ** argv;
Expand All @@ -165,22 +150,6 @@ void caml_main(argc, argv)
verbose_init = 1;
#endif

#ifdef BC_PROFILE
{
char *countfilename = getenv ("CAML_BC_COUNTFILE");
int i;

if (countfilename != NULL){
FILE *countfile = fopen (countfilename, "r");
for (i = 0; i < 128; i++) bc_counts [i] = 0;
if (countfile != NULL){
fread (bc_counts, sizeof (unsigned long), 128, countfile);
}
}
atexit (savecounts);
}
#endif /* BC_PROFILE */

i = 0;
fd = attempt_open(&argv[0], &trail, 0);

Expand Down

0 comments on commit 47e3b60

Please sign in to comment.