comparison src/share/vm/services/nmtDCmd.cpp @ 10215:31a4e55f8c9d

8004095: Add support for JMX interface to Diagnostic Framework and Commands Reviewed-by: acorn, sla
author fparain
date Fri, 03 May 2013 05:05:31 -0700
parents 06db4c0afbf3
children 78bbf4d43a14
comparison
equal deleted inserted replaced
10167:8fe2542bdc8d 10215:31a4e55f8c9d
1 /* 1 /*
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2012, 2013, 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.
69 _dcmdparser.add_dcmd_option(&_debug); 69 _dcmdparser.add_dcmd_option(&_debug);
70 #endif 70 #endif
71 _dcmdparser.add_dcmd_option(&_scale); 71 _dcmdparser.add_dcmd_option(&_scale);
72 } 72 }
73 73
74 void NMTDCmd::execute(TRAPS) { 74 void NMTDCmd::execute(DCmdSource source, TRAPS) {
75 const char* scale_value = _scale.value(); 75 const char* scale_value = _scale.value();
76 size_t scale_unit; 76 size_t scale_unit;
77 if (strcmp(scale_value, "KB") == 0 || strcmp(scale_value, "kb") == 0) { 77 if (strcmp(scale_value, "KB") == 0 || strcmp(scale_value, "kb") == 0) {
78 scale_unit = K; 78 scale_unit = K;
79 } else if (strcmp(scale_value, "MB") == 0 || 79 } else if (strcmp(scale_value, "MB") == 0 ||