equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2013, 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. |
60 return; |
60 return; |
61 } |
61 } |
62 |
62 |
63 pb = ProcessTools.createJavaProcessBuilder( |
63 pb = ProcessTools.createJavaProcessBuilder( |
64 "-server", "-Xshare:auto", "-XX:+UnlockDiagnosticVMOptions", |
64 "-server", "-Xshare:auto", "-XX:+UnlockDiagnosticVMOptions", |
65 "-XX:SharedArchiveFile=./XShareAuto.jsa", "-XX:+PrintSharedSpaces", "-version"); |
65 "-XX:SharedArchiveFile=./XShareAuto.jsa", "-Xlog:cds", "-version"); |
66 output = new OutputAnalyzer(pb.start()); |
66 output = new OutputAnalyzer(pb.start()); |
67 try { |
67 try { |
68 output.shouldContain("sharing"); |
68 output.shouldContain("sharing"); |
69 } catch (RuntimeException e) { |
69 } catch (RuntimeException e) { |
70 // if sharing failed due to ASLR or similar reasons, |
70 // if sharing failed due to ASLR or similar reasons, |