Tue, 09 Jul 2013 13:18:16 -0400
8011760: assert(delta != 0) failed: dup pointer in MemBaseline::malloc_sort_by_addr
Summary: Some of qsort implementation on Linux x86 compares element to itself, which is mistakenly treated as duplicate pointer
Reviewed-by: dcubed, acorn
zgu@3900 | 1 | /* |
fparain@5047 | 2 | * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
zgu@3900 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
zgu@3900 | 4 | * |
zgu@3900 | 5 | * This code is free software; you can redistribute it and/or modify it |
zgu@3900 | 6 | * under the terms of the GNU General Public License version 2 only, as |
zgu@3900 | 7 | * published by the Free Software Foundation. |
zgu@3900 | 8 | * |
zgu@3900 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
zgu@3900 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
zgu@3900 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
zgu@3900 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
zgu@3900 | 13 | * accompanied this code). |
zgu@3900 | 14 | * |
zgu@3900 | 15 | * You should have received a copy of the GNU General Public License version |
zgu@3900 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
zgu@3900 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
zgu@3900 | 18 | * |
zgu@3900 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
zgu@3900 | 20 | * or visit www.oracle.com if you need additional information or have any |
zgu@3900 | 21 | * questions. |
zgu@3900 | 22 | * |
zgu@3900 | 23 | */ |
zgu@3900 | 24 | |
zgu@3900 | 25 | #ifndef SHARE_VM_SERVICES_NMT_DCMD_HPP |
zgu@3900 | 26 | #define SHARE_VM_SERVICES_NMT_DCMD_HPP |
zgu@3900 | 27 | |
zgu@3900 | 28 | #include "services/diagnosticArgument.hpp" |
zgu@3900 | 29 | #include "services/diagnosticFramework.hpp" |
zgu@3900 | 30 | |
zgu@3900 | 31 | /** |
zgu@3900 | 32 | * Native memory tracking DCmd implementation |
zgu@3900 | 33 | */ |
zgu@3900 | 34 | class NMTDCmd: public DCmdWithParser { |
zgu@3900 | 35 | protected: |
zgu@3900 | 36 | DCmdArgument<bool> _summary; |
zgu@3900 | 37 | DCmdArgument<bool> _detail; |
zgu@3900 | 38 | DCmdArgument<bool> _baseline; |
zgu@3900 | 39 | DCmdArgument<bool> _summary_diff; |
zgu@3900 | 40 | DCmdArgument<bool> _detail_diff; |
zgu@3900 | 41 | DCmdArgument<bool> _shutdown; |
zgu@4810 | 42 | DCmdArgument<bool> _auto_shutdown; |
zgu@3900 | 43 | #ifndef PRODUCT |
zgu@3900 | 44 | DCmdArgument<bool> _debug; |
zgu@3900 | 45 | #endif |
zgu@3900 | 46 | DCmdArgument<char*> _scale; |
zgu@3900 | 47 | |
zgu@3900 | 48 | public: |
zgu@3900 | 49 | NMTDCmd(outputStream* output, bool heap); |
zgu@3900 | 50 | static const char* name() { return "VM.native_memory"; } |
zgu@3900 | 51 | static const char* description() { |
zgu@3900 | 52 | return "Print native memory usage"; |
zgu@3900 | 53 | } |
zgu@3900 | 54 | static const char* impact() { |
fparain@5047 | 55 | return "Medium"; |
fparain@5047 | 56 | } |
fparain@5047 | 57 | static const JavaPermission permission() { |
fparain@5047 | 58 | JavaPermission p = {"java.lang.management.ManagementPermission", |
fparain@5047 | 59 | "monitor", NULL}; |
fparain@5047 | 60 | return p; |
zgu@3900 | 61 | } |
zgu@3900 | 62 | static int num_arguments(); |
fparain@5047 | 63 | virtual void execute(DCmdSource source, TRAPS); |
zgu@3900 | 64 | }; |
zgu@3900 | 65 | |
zgu@3900 | 66 | #endif // SHARE_VM_SERVICES_NMT_DCMD_HPP |