|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
@@ -31,7 +31,8 @@ double G1NUMAStats::Stat::rate() const {
|
31 | 31 | }
|
32 | 32 |
|
33 | 33 | G1NUMAStats::NodeDataArray::NodeDataArray(uint num_nodes) {
|
34 |
| - guarantee(num_nodes > 1, "Number of nodes (%u) should be set", num_nodes); |
| 34 | + // Not using > 1, for -XX:+ForceNUMA support. |
| 35 | + guarantee(num_nodes > 0, "Number of nodes (%u) should be set", num_nodes); |
35 | 36 |
|
36 | 37 | // The row represents the number of nodes.
|
37 | 38 | _num_column = num_nodes;
|
@@ -124,7 +125,8 @@ void G1NUMAStats::NodeDataArray::copy(uint req_index, size_t* stat) {
|
124 | 125 | G1NUMAStats::G1NUMAStats(const int* node_ids, uint num_node_ids) :
|
125 | 126 | _node_ids(node_ids), _num_node_ids(num_node_ids), _node_data() {
|
126 | 127 |
|
127 |
| - assert(_num_node_ids > 1, "Should have more than one active memory nodes %u", _num_node_ids); |
| 128 | + // Not using > 1, for -XX:+ForceNUMA support. |
| 129 | + assert(_num_node_ids > 0, "Should have at least one node id: %u", _num_node_ids); |
128 | 130 |
|
129 | 131 | for (int i = 0; i < NodeDataItemsSentinel; i++) {
|
130 | 132 | _node_data[i] = new NodeDataArray(_num_node_ids);
|
|
0 commit comments