GCC Middle and Back End API Reference
tsan.c File Reference

Data Structures

struct  tsan_map_atomic

Enumerations

enum  tsan_atomic_action {
  check_last, add_seq_cst, add_acquire, weak_cas,
  strong_cas, bool_cas, val_cas, lock_release,
  fetch_op, fetch_op_seq_cst
}

Functions

static tree get_memory_access_decl ()
static tree is_vptr_store ()
static bool instrument_expr ()
static void instrument_builtin_call ()
static bool instrument_gimple ()
static bool instrument_memory_accesses ()
static void instrument_func_entry ()
static void instrument_func_exit ()
static unsigned tsan_pass ()
static bool tsan_gate ()
void tsan_finish_file ()
gimple_opt_passmake_pass_tsan ()
static bool tsan_gate_O0 ()
gimple_opt_passmake_pass_tsan_O0 ()

Variables

static struct tsan_map_atomic tsan_atomic_table []

Enumeration Type Documentation

Actions for sync/atomic builtin transformations.   
Enumerator:
check_last 
add_seq_cst 
add_acquire 
weak_cas 
strong_cas 
bool_cas 
val_cas 
lock_release 
fetch_op 
fetch_op_seq_cst 

Function Documentation

static tree get_memory_access_decl ( )
static
@verbatim GCC instrumentation plugin for ThreadSanitizer.

Copyright (C) 2011-2013 Free Software Foundation, Inc. Contributed by Dmitry Vyukov dvyuk.nosp@m.ov@g.nosp@m.oogle.nosp@m..com

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.

Number of instrumented memory accesses in the current function.   
Builds the following decl
   void __tsan_read/writeX (void *addr);   

References builtin_decl_implicit().

Referenced by instrument_expr().

static bool instrument_gimple ( )
static
static bool instrument_memory_accesses ( )
static
Instruments all interesting memory accesses in the current function.
   Return true if func entry/exit should be instrumented.   

References gsi_end_p(), gsi_next(), gsi_start_bb(), and instrument_gimple().

Referenced by tsan_pass().

static tree is_vptr_store ( )
static
Check as to whether EXPR refers to a store to vptr.   

References gimple_assign_rhs1(), and gimple_assign_single_p().

Referenced by instrument_expr().

gimple_opt_pass* make_pass_tsan ( )
gimple_opt_pass* make_pass_tsan_O0 ( )
void tsan_finish_file ( void  )
static bool tsan_gate ( )
static
The pass's gate.   
static bool tsan_gate_O0 ( )
static
static unsigned tsan_pass ( )
static

Variable Documentation

struct tsan_map_atomic tsan_atomic_table[]
static

Referenced by instrument_builtin_call().