1 /* |
1 /* |
2 * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, 2019, 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. |
40 /* The stack trace we look for by default. Note that :: has been replaced by .* |
40 /* The stack trace we look for by default. Note that :: has been replaced by .* |
41 to make sure it maches even if the symbol is not unmangled. */ |
41 to make sure it maches even if the symbol is not unmangled. */ |
42 public static String stackTraceDefault = |
42 public static String stackTraceDefault = |
43 ".*Hashtable.*allocate_new_entry.*\n" + |
43 ".*Hashtable.*allocate_new_entry.*\n" + |
44 ".*ModuleEntryTable.*new_entry.*\n" + |
44 ".*ModuleEntryTable.*new_entry.*\n" + |
45 ".*ModuleEntryTable.*locked_create_entry_or_null.*\n" + |
45 ".*ModuleEntryTable.*locked_create_entry.*\n" + |
46 ".*Modules.*define_module.*\n"; |
46 ".*Modules.*define_module.*\n"; |
47 |
47 |
48 /* The stack trace we look for on Solaris and Windows slowdebug builds. For some |
48 /* The stack trace we look for on Solaris and Windows slowdebug builds. For some |
49 reason ALWAYSINLINE for AllocateHeap is ignored, so it appears in the stack strace. */ |
49 reason ALWAYSINLINE for AllocateHeap is ignored, so it appears in the stack strace. */ |
50 public static String stackTraceAllocateHeap = |
50 public static String stackTraceAllocateHeap = |
51 ".*AllocateHeap.*\n" + |
51 ".*AllocateHeap.*\n" + |
52 ".*ModuleEntryTable.*new_entry.*\n" + |
52 ".*ModuleEntryTable.*new_entry.*\n" + |
53 ".*ModuleEntryTable.*locked_create_entry_or_null.*\n" + |
53 ".*ModuleEntryTable.*locked_create_entry.*\n" + |
54 ".*Modules.*define_module.*\n"; |
54 ".*Modules.*define_module.*\n"; |
55 |
55 |
56 /* A symbol that should always be present in NMT detail output. */ |
56 /* A symbol that should always be present in NMT detail output. */ |
57 private static String expectedSymbol = |
57 private static String expectedSymbol = |
58 "locked_create_entry_or_null"; |
58 "locked_create_entry"; |
59 |
59 |
60 public static void main(String args[]) throws Exception { |
60 public static void main(String args[]) throws Exception { |
61 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( |
61 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( |
62 "-XX:+UnlockDiagnosticVMOptions", |
62 "-XX:+UnlockDiagnosticVMOptions", |
63 "-XX:NativeMemoryTracking=detail", |
63 "-XX:NativeMemoryTracking=detail", |