projects
/
cdsspec-compiler.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
edits
[cdsspec-compiler.git]
/
benchmark
/
concurrent-hashmap
/
hashmap.h
diff --git
a/benchmark/concurrent-hashmap/hashmap.h
b/benchmark/concurrent-hashmap/hashmap.h
index 904d0b84e9233ce79246c404eec439eb86ebe62e..99973e3cedc0cefcd007fdd6abcf80d4188472ff 100644
(file)
--- a/
benchmark/concurrent-hashmap/hashmap.h
+++ b/
benchmark/concurrent-hashmap/hashmap.h
@@
-130,7
+130,7
@@
class HashMap {
/**
@Begin
@Interface: Get
/**
@Begin
@Interface: Get
- @Commit_point_set: GetReadValue1 | GetRead
Entry | GetReadValue2
+ @Commit_point_set: GetReadValue1 | GetRead
Value2 | GetReadNothing
@ID: __RET__
@Action:
int res = getIntegerMap(__map, key);
@ID: __RET__
@Action:
int res = getIntegerMap(__map, key);
@@
-156,13
+156,13
@@
class HashMap {
// lock, we ignore this operation for the SC analysis, and otherwise we
// take it into consideration
// lock, we ignore this operation for the SC analysis, and otherwise we
// take it into consideration
- /**** UL ****/
+ /**** UL
(main.cc)
****/
Entry *firstPtr = first->load(acquire);
e = firstPtr;
while (e != NULL) {
if (key, e->key) {
Entry *firstPtr = first->load(acquire);
e = firstPtr;
while (e != NULL) {
if (key, e->key) {
- /**** inadmissible ****/
+ /**** inadmissible
(testcase1.cc)
****/
res = e->value.load(seq_cst);
/**
@Begin
res = e->value.load(seq_cst);
/**
@Begin
@@
-187,12
+187,6
@@
class HashMap {
// Synchronized by locking, no need to be load acquire
Entry *newFirstPtr = first->load(relaxed);
// Synchronized by locking, no need to be load acquire
Entry *newFirstPtr = first->load(relaxed);
- /**
- @Begin
- @Commit_point_define_check: true
- @Label: GetReadEntry
- @End
- */
if (e != NULL || firstPtr != newFirstPtr) {
e = newFirstPtr;
while (e != NULL) {
if (e != NULL || firstPtr != newFirstPtr) {
e = newFirstPtr;
while (e != NULL) {
@@
-213,6
+207,12
@@
class HashMap {
}
}
seg->unlock(); // Critical region ends
}
}
seg->unlock(); // Critical region ends
+ /**
+ @Begin
+ @Commit_point_define_check: true
+ @Label: GetReadNothing
+ @End
+ */
return 0;
}
return 0;
}
@@
-249,7
+249,7
@@
class HashMap {
// with the previous put()), no need to be acquire
oldValue = e->value.load(relaxed);
// with the previous put()), no need to be acquire
oldValue = e->value.load(relaxed);
- /**** inadmissible ****/
+ /**** inadmissible
(testcase1.cc)
****/
e->value.store(value, seq_cst);
/**
@Begin
e->value.store(value, seq_cst);
/**
@Begin
@@
-267,9
+267,16
@@
class HashMap {
// Add to front of list
Entry *newEntry = new Entry(hash, key, value, firstPtr);
// Add to front of list
Entry *newEntry = new Entry(hash, key, value, firstPtr);
- /**** UL ****/
+ /**** UL
(main.cc)
****/
// Publish the newEntry to others
first->store(newEntry, release);
// Publish the newEntry to others
first->store(newEntry, release);
+ /**
+ @Begin
+ @Commit_point_clear: true
+ @Label: PutClear
+ @End
+ */
+
/**
@Begin
@Commit_point_define_check: true
/**
@Begin
@Commit_point_define_check: true