]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Disable hash-table sanitization for mem stats maps.
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Jun 2019 13:07:07 +0000 (13:07 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Jun 2019 13:07:07 +0000 (13:07 +0000)
2019-06-12  Martin Liska  <mliska@suse.cz>

* ggc-common.c (ggc_prune_overhead_list): Do not sanitize
the created map.
* hash-map.h: Add sanitize_eq_and_hash into ::hash_map.
* mem-stats.h (mem_alloc_description::mem_alloc_description):
Do not sanitize created maps.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272183 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ggc-common.c
gcc/hash-map.h
gcc/mem-stats.h

index d58835d08a5f8aab52b8ef3ee14e798879bf90ea..214ded49f1a1e2e13621c989791e3522810c1cca 100644 (file)
@@ -1,3 +1,11 @@
+2019-06-12  Martin Liska  <mliska@suse.cz>
+
+       * ggc-common.c (ggc_prune_overhead_list): Do not sanitize
+       the created map.
+       * hash-map.h: Add sanitize_eq_and_hash into ::hash_map.
+       * mem-stats.h (mem_alloc_description::mem_alloc_description):
+       Do not sanitize created maps.
+
 2019-06-12  Aldy Hernandez  <aldyh@redhat.com>
 
        * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Use
index 2acdb6dc60c42fb753c4cde54f7dce051235283a..6fb5a3d5ceb21d56956addd9093a6a63212c38eb 100644 (file)
@@ -1014,5 +1014,5 @@ ggc_prune_overhead_list (void)
       (*it).second.first->m_collected += (*it).second.second;
 
   delete ggc_mem_desc.m_reverse_object_map;
-  ggc_mem_desc.m_reverse_object_map = new map_t (13, false, false);
+  ggc_mem_desc.m_reverse_object_map = new map_t (13, false, false, false);
 }
index a8eb42d5a036fefd1132ac99f52b2e136b0d1cc7..588dfda04fac5d1f6df1dea59fc316eeeb6255ba 100644 (file)
@@ -118,16 +118,19 @@ class GTY((user)) hash_map
 
 public:
   explicit hash_map (size_t n = 13, bool ggc = false,
+                    bool sanitize_eq_and_hash = true,
                     bool gather_mem_stats = GATHER_STATISTICS
                     CXX_MEM_STAT_INFO)
-    : m_table (n, ggc, true, gather_mem_stats, HASH_MAP_ORIGIN PASS_MEM_STAT)
+    : m_table (n, ggc, sanitize_eq_and_hash, gather_mem_stats,
+              HASH_MAP_ORIGIN PASS_MEM_STAT)
   {
   }
 
   explicit hash_map (const hash_map &h, bool ggc = false,
+                    bool sanitize_eq_and_hash = true,
                     bool gather_mem_stats = GATHER_STATISTICS
                     CXX_MEM_STAT_INFO)
-    : m_table (h.m_table, ggc, true, gather_mem_stats,
+    : m_table (h.m_table, ggc, sanitize_eq_and_hash, gather_mem_stats,
               HASH_MAP_ORIGIN PASS_MEM_STAT) {}
 
   /* Create a hash_map in ggc memory.  */
@@ -136,7 +139,7 @@ public:
                               CXX_MEM_STAT_INFO)
     {
       hash_map *map = ggc_alloc<hash_map> ();
-      new (map) hash_map (size, true, gather_mem_stats PASS_MEM_STAT);
+      new (map) hash_map (size, true, true, gather_mem_stats PASS_MEM_STAT);
       return map;
     }
 
index 63ce8712e2b0f7a676b04dd8f55ad749231a761f..7796059575377ccc77c5198cfddda7d9d948fcd6 100644 (file)
@@ -559,9 +559,9 @@ template <class T>
 inline
 mem_alloc_description<T>::mem_alloc_description ()
 {
-  m_map = new mem_map_t (13, false, false);
-  m_reverse_map = new reverse_mem_map_t (13, false, false);
-  m_reverse_object_map = new reverse_object_map_t (13, false, false);
+  m_map = new mem_map_t (13, false, false, false);
+  m_reverse_map = new reverse_mem_map_t (13, false, false, false);
+  m_reverse_object_map = new reverse_object_map_t (13, false, false, false);
 }
 
 /* Default destructor.  */