Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: src/IceASanInstrumentation.h

Issue 2128383002: Blacklisted instrumenting _Balloc. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===- subzero/src/IceASanInstrumentation.h - AddressSanitizer --*- C++ -*-===// 1 //===- subzero/src/IceASanInstrumentation.h - AddressSanitizer --*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 24 matching lines...) Expand all
35 public: 35 public:
36 ASanInstrumentation(GlobalContext *Ctx) 36 ASanInstrumentation(GlobalContext *Ctx)
37 : Instrumentation(Ctx), RzNum(0), 37 : Instrumentation(Ctx), RzNum(0),
38 GlobalsLock(GlobalsMutex, std::defer_lock) { 38 GlobalsLock(GlobalsMutex, std::defer_lock) {
39 ICE_TLS_INIT_FIELD(LocalDtors); 39 ICE_TLS_INIT_FIELD(LocalDtors);
40 } 40 }
41 void instrumentGlobals(VariableDeclarationList &Globals) override; 41 void instrumentGlobals(VariableDeclarationList &Globals) override;
42 42
43 private: 43 private:
44 std::string nextRzName(); 44 std::string nextRzName();
45 bool isInstrumentable(Cfg *Func) override;
45 void instrumentFuncStart(LoweringContext &Context) override; 46 void instrumentFuncStart(LoweringContext &Context) override;
46 void instrumentCall(LoweringContext &Context, InstCall *Instr) override; 47 void instrumentCall(LoweringContext &Context, InstCall *Instr) override;
47 void instrumentRet(LoweringContext &Context, InstRet *Instr) override; 48 void instrumentRet(LoweringContext &Context, InstRet *Instr) override;
48 void instrumentLoad(LoweringContext &Context, InstLoad *Instr) override; 49 void instrumentLoad(LoweringContext &Context, InstLoad *Instr) override;
49 void instrumentStore(LoweringContext &Context, InstStore *Instr) override; 50 void instrumentStore(LoweringContext &Context, InstStore *Instr) override;
50 void instrumentAccess(LoweringContext &Context, Operand *Op, SizeT Size, 51 void instrumentAccess(LoweringContext &Context, Operand *Op, SizeT Size,
51 Constant *AccessFunc); 52 Constant *AccessFunc);
52 void instrumentStart(Cfg *Func) override; 53 void instrumentStart(Cfg *Func) override;
53 void finishFunc(Cfg *Func) override; 54 void finishFunc(Cfg *Func) override;
54 ICE_TLS_DECLARE_FIELD(std::vector<InstCall *> *, LocalDtors); 55 ICE_TLS_DECLARE_FIELD(std::vector<InstCall *> *, LocalDtors);
55 std::atomic<uint32_t> RzNum; 56 std::atomic<uint32_t> RzNum;
56 bool DidProcessGlobals = false; 57 bool DidProcessGlobals = false;
57 SizeT RzGlobalsNum = 0; 58 SizeT RzGlobalsNum = 0;
58 std::mutex GlobalsMutex; 59 std::mutex GlobalsMutex;
59 std::unique_lock<std::mutex> GlobalsLock; 60 std::unique_lock<std::mutex> GlobalsLock;
60 std::condition_variable GlobalsDoneCV; 61 std::condition_variable GlobalsDoneCV;
61 }; 62 };
62 } // end of namespace Ice 63 } // end of namespace Ice
63 64
64 #endif // SUBZERO_SRC_ICEASANINSTRUMENTATION_H 65 #endif // SUBZERO_SRC_ICEASANINSTRUMENTATION_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698