equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
53 Summary_baselined, |
53 Summary_baselined, |
54 Detail_baselined |
54 Detail_baselined |
55 }; |
55 }; |
56 |
56 |
57 enum SortingOrder { |
57 enum SortingOrder { |
58 by_address, // by memory address |
58 by_address, // by memory address |
59 by_size, // by memory size |
59 by_size, // by memory size |
60 by_site // by call site where the memory is allocated from |
60 by_site, // by call site where the memory is allocated from |
|
61 by_site_and_type // by call site and memory type |
61 }; |
62 }; |
62 |
63 |
63 private: |
64 private: |
64 // Summary information |
65 // Summary information |
65 MallocMemorySnapshot _malloc_memory_snapshot; |
66 MallocMemorySnapshot _malloc_memory_snapshot; |
186 // Sorting allocation sites in different orders |
187 // Sorting allocation sites in different orders |
187 // Sort allocation sites in size order |
188 // Sort allocation sites in size order |
188 void malloc_sites_to_size_order(); |
189 void malloc_sites_to_size_order(); |
189 // Sort allocation sites in call site address order |
190 // Sort allocation sites in call site address order |
190 void malloc_sites_to_allocation_site_order(); |
191 void malloc_sites_to_allocation_site_order(); |
|
192 // Sort allocation sites in call site address and memory type order |
|
193 void malloc_sites_to_allocation_site_and_type_order(); |
191 |
194 |
192 // Sort allocation sites in reserved size order |
195 // Sort allocation sites in reserved size order |
193 void virtual_memory_sites_to_size_order(); |
196 void virtual_memory_sites_to_size_order(); |
194 // Sort allocation sites in call site address order |
197 // Sort allocation sites in call site address order |
195 void virtual_memory_sites_to_reservation_site_order(); |
198 void virtual_memory_sites_to_reservation_site_order(); |