Skip to content

Commit 469caeb

Browse files
authored
Remove unused CALI_CALIPER_ALLOW_REGION_OVERLAP setting (LLNL#570)
1 parent 2d46914 commit 469caeb

File tree

2 files changed

+5
-38
lines changed

2 files changed

+5
-38
lines changed

src/caliper/Caliper.cpp

+5-13
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,6 @@ struct Caliper::GlobalData
315315

316316
// --- data
317317

318-
bool allow_region_overlap;
319-
320318
mutable std::mutex attribute_lock;
321319
map<string, Attribute> attribute_map;
322320

@@ -399,8 +397,6 @@ struct Caliper::GlobalData
399397
attribute_default_scope = CALI_ATTR_SCOPE_THREAD;
400398
else
401399
log_invalid_cfg_value("CALI_CALIPER_ATTRIBUTE_DEFAULT_SCOPE", scope_str.c_str());
402-
403-
allow_region_overlap = config.get("allow_region_overlap").to_bool();
404400
}
405401

406402
void init() {
@@ -523,10 +519,6 @@ const ConfigSet::Entry Caliper::GlobalData::s_configdata[] = {
523519
" process: Process scope\n"
524520
" thread: Thread scope"
525521
},
526-
{ "allow_region_overlap", CALI_TYPE_BOOL, "false",
527-
"Allow overlapping regions for all attributes",
528-
"Allow overlapping begin/end regions for all attributes."
529-
},
530522

531523
ConfigSet::Terminator
532524
};
@@ -658,7 +650,7 @@ struct BlackboardEntry
658650
};
659651

660652
inline BlackboardEntry
661-
load_current_entry(const Attribute& attr, cali_id_t key, Blackboard& blackboard, bool allow_overlap)
653+
load_current_entry(const Attribute& attr, cali_id_t key, Blackboard& blackboard)
662654
{
663655
Entry merged_entry = blackboard.get(key);
664656
Entry entry = merged_entry.get(attr);
@@ -668,7 +660,7 @@ load_current_entry(const Attribute& attr, cali_id_t key, Blackboard& blackboard,
668660
log_stack_error(nullptr, attr);
669661
return { Entry(), Entry() };
670662
}
671-
if (key != UNALIGNED_KEY && !allow_overlap) {
663+
if (key != UNALIGNED_KEY) {
672664
log_stack_error(merged_entry.node(), attr);
673665
return { Entry(), Entry() };
674666
}
@@ -1028,7 +1020,7 @@ Caliper::end(const Attribute& attr)
10281020
std::lock_guard<::siglock>
10291021
g(sT->lock);
10301022

1031-
auto current = load_current_entry(attr, key, *blackboard, sG->allow_region_overlap);
1023+
auto current = load_current_entry(attr, key, *blackboard);
10321024

10331025
if (current.entry.empty()) {
10341026
sT->stack_error = true;
@@ -1068,7 +1060,7 @@ Caliper::end_with_value_check(const Attribute& attr, const Variant& data)
10681060
std::lock_guard<::siglock>
10691061
g(sT->lock);
10701062

1071-
auto current = load_current_entry(attr, key, *blackboard, sG->allow_region_overlap);
1063+
auto current = load_current_entry(attr, key, *blackboard);
10721064

10731065
if (current.entry.empty() || data != current.entry.value()) {
10741066
log_stack_value_error(current.entry, attr, data);
@@ -1143,7 +1135,7 @@ Caliper::end(Channel* channel, const Attribute& attr)
11431135
g(sT->lock);
11441136

11451137
BlackboardEntry current =
1146-
load_current_entry(attr, key, channel->mP->channel_blackboard, sG->allow_region_overlap);
1138+
load_current_entry(attr, key, channel->mP->channel_blackboard);
11471139

11481140
if (current.entry.empty()) {
11491141
sT->stack_error = true;

test/ci_app_tests/test_validator.py

-25
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,6 @@
66
class CaliperValidatorTest(unittest.TestCase):
77
""" Caliper validator service test cases """
88

9-
def test_validator_nesting_error(self):
10-
target_cmd = [ '../cali-test', 'nesting-error' ]
11-
12-
env = {
13-
'CALI_LOG_VERBOSITY' : '1',
14-
'CALI_LOG_LOGFILE' : 'stdout',
15-
'CALI_SERVICES_ENABLE' : 'validator',
16-
'CALI_CALIPER_ALLOW_REGION_OVERLAP' : 'true'
17-
}
18-
19-
log_targets = [
20-
'validator: incorrect nesting: trying to end "test.nesting-error.a"="11" but current attribute is "test.nesting-error.b"',
21-
'validator: Annotation nesting errors found'
22-
]
23-
24-
report_out,_ = cat.run_test(target_cmd, env)
25-
lines = report_out.decode().splitlines()
26-
27-
for target in log_targets:
28-
for line in lines:
29-
if target in line:
30-
break
31-
else:
32-
self.fail('%s not found in log' % target)
33-
349
def test_validator_unclosed_region(self):
3510
target_cmd = [ '../cali-test', 'unclosed-region' ]
3611

0 commit comments

Comments
 (0)