看看介绍
// This file defines dynamic annotations for use with dynamic analysis
// tool such as valgrind, PIN, etc.
//
// Dynamic annotation is a source code annotation that affects
// the generated code (that is, the annotation is not a comment).
// Each such annotation is attached to a particular
// instruction and/or to a particular object (address) in the program.
//
// The annotations that should be used by users are macros in all upper-case
// (e.g., ANNOTATE_NEW_MEMORY).
//
// Actual implementation of these macros may differ depending on the
// dynamic analysis tool being used.
//
// This file supports the following dynamic analysis tools:
// - None (NDEBUG is defined).
// Macros are defined empty.
// - ThreadSanitizer (NDEBUG is not defined).
// Macros are defined as calls to non-inlinable empty functions
// that are intercepted by ThreadSanitizer.
//

使用方法:

// -------------------------------------------------------------
// Annotations useful when implementing condition variables such as CondVar,
// using conditional critical sections (Await/LockWhen) and when constructing
// user-defined synchronization mechanisms.
//
// The annotations ANNOTATE_HAPPENS_BEFORE() and ANNOTATE_HAPPENS_AFTER() can
// be used to define happens-before arcs in user-defined synchronization
// mechanisms: the race detector will infer an arc from the former to the
// latter when they share the same argument pointer.
//
// Example 1 (reference counting):
//
// void Unref() {
// ANNOTATE_HAPPENS_BEFORE(&refcount_);
// if (AtomicDecrementByOne(&refcount_) == 0) {
// ANNOTATE_HAPPENS_AFTER(&refcount_);
// delete this;
// }
// }
//
// Example 2 (message queue):
//
// void MyQueue::Put(Type *e) {
// MutexLock lock(&mu_);
// ANNOTATE_HAPPENS_BEFORE(e);
// PutElementIntoMyQueue(e);
// }
//
// Type *MyQueue::Get() {
// MutexLock lock(&mu_);
// Type *e = GetElementFromMyQueue();
// ANNOTATE_HAPPENS_AFTER(e);
// return e;
// }
//
// Note: when possible, please use the existing reference counting and message
// queue implementations instead of inventing new ones.

chromium之dynamic_annotations的更多相关文章

  1. chromium之lazy_instance

    先看看介绍 // The LazyInstance<Type, Traits> class manages a single instance of Type, // which will ...

  2. Chromium之工程依赖关系.

    Chromium各版本可能有差异,我的版本是chromium.r197479,2013/08前后下载的source code. Visual Studio Ultimate版本有工具可以自动生成项目依 ...

  3. QT5利用chromium内核与HTML页面交互

    在QT5.4之前,做QT开发浏览器只能选择QWebkit,但是有过使用的都会发现,这个webkit不是出奇的慢,简直是慢的令人发指,Release模式下还行,debug下你就无语了,但是webkit毕 ...

  4. Google之Chromium浏览器源码学习——base公共通用库(一)

    Google的优秀C++开源项目繁多,其中的Chromium浏览器项目可以说是很具有代表性的,此外还包括其第三开发开源库或是自己的优秀开源库,可以根据需要抽取自己感兴趣的部分.在研究.学习该项目前的时 ...

  5. 如何在windows上编译Chromium (CEF3) 并加入MP3支持(二)

    时隔一年,再次编译cef3,独一无二的目的仍为加入mp3支持.新版本的编译环境和注意事项都已经发生了变化,于是再记录一下. 一.编译版本 cef版本号格式为X.YYYY.A.gHHHHHHH X为主版 ...

  6. 如何在Windows上从源码编译Chromium (CEF3) 加入mp3支持

    一.什么是CEF CEF即Chromium Embeded Framework,由谷歌的开源浏览器项目Chromium扩展而来,可方便地嵌入其它程序中以得到浏览器功能. CEF包括CEF1和CEF3两 ...

  7. 构建基于Chromium的应用程序

    chromium是google chrome浏览器所采用的内核,最开始由苹果的webkit发展而出,由于webkit在发展上存在分歧,而google希望在开发上有更大的自由度,2013年google决 ...

  8. ubuntu中chromium无法播放flash,安装flash

    ubuntu14.0.4中系统自带的chromium无法播放flash,后来查了下,得知chromium已经不支持adobe flash了,用户可使用pepper flash替代.安装pepper f ...

  9. windows下编译chromium浏览器的15个流程整理

    编译chromium 系统为windows, 国内在windows上编译chromium的资料比较少, 我这篇文章只能作为参考, 记录我遇到的一些问题,因为chromium团队也会修改了代码,或者编译 ...

随机推荐

  1. 关于github改名问题

    不喜欢github显示的目录名字于是百度了下,更改过程,记录下来,方便日后查看! 首页右上角点击出来菜单,找到Settings按钮点击 左侧找到Account账号菜单点击 找到change usern ...

  2. git使用笔记 bitbucket基本操作

    实现目标: 1.将本地已经存在的项目文件保存到 bitbucket.org 2.从 bitbucket.org 检出代码库到本地 操作笔记: 1.首先在bitbucket.org创建一个代码库,并得到 ...

  3. 01_编程规约——OOP规约

    1.[强制]避免通过一个类的对象引用访问此类的静态变量或静态方法,避免增加编译器解析成本,直接用“类名.变量名”访问即可. 2.[强制]所有的覆盖方法,必须加@Override注解 说明:加@Over ...

  4. DBGridEh常用技巧

    一.增加多表头显示方式 DBGridEh1.UseMultiTitle:=True; //打开多标题显示方式 DBGridEh1.Columns[].Title.Caption:='员工编号'; // ...

  5. PHP 如何实现网址伪静态

    Apache的 mod_rewrite是比较强大的,在进行网站建设时,可以通过这个模块来实现伪静态. 主要步骤如下: 1.检测Apache是否开启mod_rewrite功能     可以通过php提供 ...

  6. ubuntu安装最新版node和npm

    1.先在系统上安装好nodejs和npm           sudo apt-get install nodejs-legacy sudo apt-get install npm     2.升级n ...

  7. c#编程指南(六) 类索引器(Class Indexer)

    类索引器,可以使得你使用数组一样的方式来访问类的数据. 这种访问多见于数组,列表,词典,哈希表的快捷访问. 实际上写法很简单,写成:public T1 this[T2 i] 代码如下: using S ...

  8. SQL Server 使用 OUTPUT做数据操作记录

    OUTPUT 子句 可以在数据进行增删改的时候,可以返回受影响的行.先准备一张表 create table #t ( id int identity primary key ,name ) ) go ...

  9. IE Edge 下载文件的时候,文件名不能有windows不支持的特殊字符

    IE Edge 下载文件的时候,文件名不能有windows不支持的特殊字符,比如:等. 马了个批的,其他浏览器包括IE就可以自动转换,比如:会自动变为_.

  10. mysql 修改已存在的表增加ID属性为auto_increment自动增长

    今天有需要将已经存在表设置自动增长属性 具体如下 alter table customers change id id int not null auto_increment primary key; ...