comparison test/runtime/NMT/SummaryAfterShutdown.java @ 20804:7848fc12602b

Merge with jdk8u40-b25
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Tue, 07 Apr 2015 14:58:49 +0200
parents 6640f982c1be
children
comparison
equal deleted inserted replaced
20184:84105dcdb05b 20804:7848fc12602b
1 /* 1 /*
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2013, 2014, 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.
42 // Run 'jcmd <pid> VM.native_memory shutdown' 42 // Run 'jcmd <pid> VM.native_memory shutdown'
43 pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "shutdown"}); 43 pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "shutdown"});
44 output = new OutputAnalyzer(pb.start()); 44 output = new OutputAnalyzer(pb.start());
45 45
46 // Verify that jcmd reports that NMT is shutting down 46 // Verify that jcmd reports that NMT is shutting down
47 output.shouldContain("Shutdown is in progress, it will take a few moments to completely shutdown"); 47 output.shouldContain("Native memory tracking has been turned off");
48 48
49 // Run 'jcmd <pid> VM.native_memory summary' 49 // Run 'jcmd <pid> VM.native_memory summary'
50 pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "summary"}); 50 pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "summary"});
51 output = new OutputAnalyzer(pb.start()); 51 output = new OutputAnalyzer(pb.start());
52 52
53 // Verify that jcmd reports that NMT has been shutdown 53 // Verify that jcmd reports that NMT has been shutdown
54 output.shouldContain("Native memory tracking has been shutdown by user"); 54 output.shouldContain("Native memory tracking has been shutdown");
55 } 55 }
56 } 56 }