This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

64bit cleanups for ggc-*.c


Somebody should probably check and install this.

Brad

	* ggc-common.c (ggc_print_statistics): clean up 64bit problems
	* ggc-page.c (ggc_page_print_statistics): ditto

popov-13% rcsdiff -c RCS/*
===================================================================
RCS file: RCS/ggc-common.c,v
retrieving revision 1.1
diff -c -r1.1 ggc-common.c
*** ggc-common.c	1999/10/29 17:51:53	1.1
--- ggc-common.c	1999/10/29 18:03:27
***************
*** 524,539 ****
    for (code = 0; code < MAX_TREE_CODES; ++code)
      if (ggc_stats->num_trees[code]) 
        {
! 	fprintf (stream, "%s%*s%-15u %-15u %7.3f\n", 
  		 tree_code_name[code],
! 		 22 - strlen (tree_code_name[code]), "",
  		 ggc_stats->num_trees[code],
  		 ggc_stats->size_trees[code],
  		 (100 * ((double) ggc_stats->size_trees[code]) 
  		  / ggc_stats->total_size_trees));
        }
    fprintf (stream,
! 	   "%-22s%-15u %-15u\n", "Total",
  	   ggc_stats->total_num_trees,
  	   ggc_stats->total_size_trees);
  
--- 524,539 ----
    for (code = 0; code < MAX_TREE_CODES; ++code)
      if (ggc_stats->num_trees[code]) 
        {
! 	fprintf (stream, "%s%*s%-15u %-15lu %7.3f\n", 
  		 tree_code_name[code],
! 		 22 - (int) strlen (tree_code_name[code]), "",
  		 ggc_stats->num_trees[code],
  		 ggc_stats->size_trees[code],
  		 (100 * ((double) ggc_stats->size_trees[code]) 
  		  / ggc_stats->total_size_trees));
        }
    fprintf (stream,
! 	   "%-22s%-15u %-15lu\n", "Total",
  	   ggc_stats->total_num_trees,
  	   ggc_stats->total_size_trees);
  
***************
*** 543,558 ****
    for (code = 0; code < NUM_RTX_CODE; ++code)
      if (ggc_stats->num_rtxs[code]) 
        {
! 	fprintf (stream, "%s%*s%-15u %-15u %7.3f\n", 
  		 rtx_name[code],
! 		 22 - strlen (rtx_name[code]), "",
  		 ggc_stats->num_rtxs[code],
  		 ggc_stats->size_rtxs[code],
  		 (100 * ((double) ggc_stats->size_rtxs[code]) 
  		  / ggc_stats->total_size_rtxs));
        }
    fprintf (stream,
! 	   "%-22s%-15u %-15u\n", "Total",
  	   ggc_stats->total_num_rtxs,
  	   ggc_stats->total_size_rtxs);
  
--- 543,558 ----
    for (code = 0; code < NUM_RTX_CODE; ++code)
      if (ggc_stats->num_rtxs[code]) 
        {
! 	fprintf (stream, "%s%*s%-15u %-15lu %7.3f\n", 
  		 rtx_name[code],
! 		 22 - (int) strlen (rtx_name[code]), "",
  		 ggc_stats->num_rtxs[code],
  		 ggc_stats->size_rtxs[code],
  		 (100 * ((double) ggc_stats->size_rtxs[code]) 
  		  / ggc_stats->total_size_rtxs));
        }
    fprintf (stream,
! 	   "%-22s%-15u %-15lu\n", "Total",
  	   ggc_stats->total_num_rtxs,
  	   ggc_stats->total_size_rtxs);
  
===================================================================
RCS file: RCS/ggc-page.c,v
retrieving revision 1.1
diff -c -r1.1 ggc-page.c
*** ggc-page.c	1999/10/29 17:53:54	1.1
--- ggc-page.c	1999/10/29 17:59:57
***************
*** 1146,1155 ****
  	  in_use += 
  	    (OBJECTS_PER_PAGE (i) - p->num_free_objects) * (1 << i);
  	}
!       fprintf (stderr, "%-3d %-15u %-15u\n", i, allocated, in_use);
      }
  
    /* Print out some global information.  */
!   fprintf (stderr, "\nTotal bytes marked: %u\n", G.allocated);
!   fprintf (stderr, "Total bytes mapped: %u\n", G.bytes_mapped);
  }
--- 1146,1155 ----
  	  in_use += 
  	    (OBJECTS_PER_PAGE (i) - p->num_free_objects) * (1 << i);
  	}
!       fprintf (stderr, "%-3d %-15lu %-15lu\n", i, allocated, in_use);
      }
  
    /* Print out some global information.  */
!   fprintf (stderr, "\nTotal bytes marked: %lu\n", G.allocated);
!   fprintf (stderr, "Total bytes mapped: %lu\n", G.bytes_mapped);
  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]