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]
Other format: [Raw text]

Re: [google] Modification of gcov pmu format to reduce gcda size bloat (issue 6427063)


On 2012/08/24 21:51:24, cmang wrote:
Fixed formatting issues.

The gcov.c is still not uploaded properly.


===================================================================
--- gcc/gcov.c	(revision 190359)
+++ gcc/gcov.c	(working copy)
@@ -222,6 +222,7 @@ typedef struct pmu_data
  {
    ll_infos_t ll_infos;
    brm_infos_t brm_infos;
+  string_table_t string_table;
  } pmu_data_t;

/* Describes a single line of source. Contains a chain of basic
blocks
@@ -975,6 +976,7 @@ release_structures (void)
    function_t *fn;
    ll_infos_t *ll_infos = &pmu_global_info.ll_infos;
    brm_infos_t *brm_infos = &pmu_global_info.brm_infos;
+  string_table_t *string_table = &pmu_global_info.string_table;

    for (ix = n_sources; ix--;)
      {
@@ -1008,8 +1010,6 @@ release_structures (void)
        /* delete each element */
        for (i = 0; i < ll_infos->ll_count; ++i)
          {
-          if (ll_infos->ll_array[i]->filename)
-            XDELETE (ll_infos->ll_array[i]->filename);
            XDELETE (ll_infos->ll_array[i]);
          }
        /* delete the array itself */
@@ -1026,8 +1026,6 @@ release_structures (void)
        /* delete each element */
        for (i = 0; i < brm_infos->brm_count; ++i)
          {
-          if (brm_infos->brm_array[i]->filename)
-            XDELETE (brm_infos->brm_array[i]->filename);
            XDELETE (brm_infos->brm_array[i]);
          }
        /* delete the array itself */
@@ -1035,6 +1033,22 @@ release_structures (void)
        brm_infos->brm_array = NULL;
        brm_infos->brm_count = 0;
      }
+
+  /* Cleanup PMU string table entries. */
+  if (string_table->st_count)
+    {
+      unsigned i;
+
+      /* delete each element */
+      for (i = 0; i < string_table->st_count; ++i)
+        {
+          XDELETE (string_table->st_array[i]);
+        }

Remove {}.





http://codereview.appspot.com/6427063/



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