chromium之dynamic_annotations
看看介绍
// 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的更多相关文章
- chromium之lazy_instance
先看看介绍 // The LazyInstance<Type, Traits> class manages a single instance of Type, // which will ...
- Chromium之工程依赖关系.
Chromium各版本可能有差异,我的版本是chromium.r197479,2013/08前后下载的source code. Visual Studio Ultimate版本有工具可以自动生成项目依 ...
- QT5利用chromium内核与HTML页面交互
在QT5.4之前,做QT开发浏览器只能选择QWebkit,但是有过使用的都会发现,这个webkit不是出奇的慢,简直是慢的令人发指,Release模式下还行,debug下你就无语了,但是webkit毕 ...
- Google之Chromium浏览器源码学习——base公共通用库(一)
Google的优秀C++开源项目繁多,其中的Chromium浏览器项目可以说是很具有代表性的,此外还包括其第三开发开源库或是自己的优秀开源库,可以根据需要抽取自己感兴趣的部分.在研究.学习该项目前的时 ...
- 如何在windows上编译Chromium (CEF3) 并加入MP3支持(二)
时隔一年,再次编译cef3,独一无二的目的仍为加入mp3支持.新版本的编译环境和注意事项都已经发生了变化,于是再记录一下. 一.编译版本 cef版本号格式为X.YYYY.A.gHHHHHHH X为主版 ...
- 如何在Windows上从源码编译Chromium (CEF3) 加入mp3支持
一.什么是CEF CEF即Chromium Embeded Framework,由谷歌的开源浏览器项目Chromium扩展而来,可方便地嵌入其它程序中以得到浏览器功能. CEF包括CEF1和CEF3两 ...
- 构建基于Chromium的应用程序
chromium是google chrome浏览器所采用的内核,最开始由苹果的webkit发展而出,由于webkit在发展上存在分歧,而google希望在开发上有更大的自由度,2013年google决 ...
- ubuntu中chromium无法播放flash,安装flash
ubuntu14.0.4中系统自带的chromium无法播放flash,后来查了下,得知chromium已经不支持adobe flash了,用户可使用pepper flash替代.安装pepper f ...
- windows下编译chromium浏览器的15个流程整理
编译chromium 系统为windows, 国内在windows上编译chromium的资料比较少, 我这篇文章只能作为参考, 记录我遇到的一些问题,因为chromium团队也会修改了代码,或者编译 ...
随机推荐
- ueditor默认字体和字号修改
ueditor编辑器默认字号是16号,默认字体为sans-serif,显得有些难看,所以决定修改默认值.配置文件ueditor.config.js可以修改整个编辑器配置项,里面有配置项fontfami ...
- C# textBox限定输入数字
private void tBox_KeyPress(object sender, KeyPressEventArgs e) { ; //禁止空格键 )) return; //处理负数 if (e.K ...
- 【转】Silverlight无法添加服务引用
引用地址:http://blog.sina.com.cn/s/blog_6e9c36f501017yzv.html 错误如下: 错误 7 自定义工具错误: 无法生成服务引用“ServiceRefere ...
- 【Udacity】数据的差异性:值域、IQR、方差和标准差
一.值域(Range) Range = Max - Min 受异常值(Outliers)影响 二.四分位差(IQR) 四分位距(interquartile range, IQR),又称四分差.是描述统 ...
- 【系统】在windows中追加/删除虚拟打印机
由于项目需要在windwos系统中添加多台虚拟打印机(能够正常打印出纸),查找了一下系统函数. 使用 rundll32 printui.dll,PrintUIEntry,在CMD中运行,在弹出框中得到 ...
- myeclipse 复制项目不包含svn或CVS目录
目前只记录到2个方法:(SVN和CVS都适用) 方法一:导出法 1.右击需要cp的目录,点击export,General/File System 2.next 3.确认你选择的目录,并勾选:Creat ...
- January 28 2017 Week 4 Saturday
Do what you say, say what you do. 做你说过的,说你能做的. Do more than what you say, and sometimes say more tha ...
- 使用websploit在局域网全自动渗透
原理为 websploit调用dnsdpoof进行dns欺骗配合神器metasploit的web_autopwn模块进行渗透:特点:过程基本全自动. 终端输入websploit打开websploit: ...
- Windows文件批量重命名
选择要命名的文件 按F2,编辑名字 然后按回车就行了 电视剧命名,我认为这样足够了
- 转化ico标志
emmm,谨此纪念我这七秒钟的记忆. ico最简单的转化方法,上网搜索ico图标转换即可