overflow is handled anyway
saves memory because each thread holds 1024 mutexsets
llvm-svn: 177520
// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s
#include "java.h"
+#include <unistd.h>
jptr varaddr;
jptr lockaddr;
void *Thread(void *p) {
+ sleep(1);
__tsan_java_mutex_lock(lockaddr);
*(int*)varaddr = 42;
__tsan_java_mutex_unlock(lockaddr);
public:
// Holds limited number of mutexes.
// The oldest mutexes are discarded on overflow.
- static const uptr kMaxSize = 64;
+ static const uptr kMaxSize = 16;
struct Desc {
u64 id;
u64 epoch;