mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
When analyzing Valgrind with drd, suppress uninteresting race reports on VG_(threads)[].status
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12432
This commit is contained in:
parent
0d812117a5
commit
4e36be3285
@ -2003,6 +2003,8 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp )
|
||||
VG_(printf_xml)( "\n" );
|
||||
}
|
||||
|
||||
VG_(init_Threads)();
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Initialise the scheduler (phase 1) [generates tid_main]
|
||||
// p: none, afaics
|
||||
|
||||
@ -33,6 +33,11 @@
|
||||
#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
|
||||
#include "pub_core_threadstate.h"
|
||||
#include "pub_core_libcassert.h"
|
||||
#include "pub_tool_inner.h"
|
||||
#if defined(ENABLE_INNER_CLIENT_REQUEST)
|
||||
#include "helgrind/helgrind.h"
|
||||
#include "drd/drd.h"
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------*/
|
||||
/*--- Data structures. ---*/
|
||||
@ -46,6 +51,15 @@ ThreadState VG_(threads)[VG_N_THREADS];
|
||||
/*--- Operations. ---*/
|
||||
/*------------------------------------------------------------*/
|
||||
|
||||
void VG_(init_Threads)(void)
|
||||
{
|
||||
ThreadId tid;
|
||||
|
||||
for (tid = 1; tid < VG_N_THREADS; tid++)
|
||||
INNER_REQUEST(ANNOTATE_BENIGN_RACE_SIZED(&VG_(threads)[tid].status,
|
||||
sizeof(VG_(threads)[tid].status), ""));
|
||||
}
|
||||
|
||||
const HChar* VG_(name_of_ThreadStatus) ( ThreadStatus status )
|
||||
{
|
||||
switch (status) {
|
||||
|
||||
@ -373,6 +373,9 @@ extern ThreadId VG_(running_tid);
|
||||
/*--- Basic operations on the thread table. ---*/
|
||||
/*------------------------------------------------------------*/
|
||||
|
||||
/* Initialize the m_threadstate module. */
|
||||
void VG_(init_Threads)(void);
|
||||
|
||||
// Convert a ThreadStatus to a string.
|
||||
const HChar* VG_(name_of_ThreadStatus) ( ThreadStatus status );
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user