HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Android 10
|
10.0.0_r6
下载
查看原文件
收藏
根目录
external
v8
src
ic
ic-stats.h
// Copyright 2016 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_IC_IC_STATS_H_ #define V8_IC_IC_STATS_H_ #include
#include
#include
#include
#include "src/base/atomicops.h" #include "src/base/lazy-instance.h" namespace v8 { namespace tracing { class TracedValue; } namespace internal { class JSFunction; class Script; struct ICInfo { ICInfo(); void Reset(); void AppendToTracedValue(v8::tracing::TracedValue* value) const; std::string type; const char* function_name; int script_offset; const char* script_name; int line_num; bool is_constructor; bool is_optimized; std::string state; // Address of the map. void* map; // Whether map is a dictionary map. bool is_dictionary_map; // Number of own descriptors. unsigned number_of_own_descriptors; std::string instance_type; }; class ICStats { public: const int MAX_IC_INFO = 4096; ICStats(); void Dump(); void Begin(); void End(); void Reset(); V8_INLINE ICInfo& Current() { DCHECK(pos_ >= 0 && pos_ < MAX_IC_INFO); return ic_infos_[pos_]; } const char* GetOrCacheScriptName(Script* script); const char* GetOrCacheFunctionName(JSFunction* function); V8_INLINE static ICStats* instance() { return instance_.Pointer(); } private: static base::LazyInstance
::type instance_; base::Atomic32 enabled_; std::vector
ic_infos_; std::unordered_map
登录后可以享受更多权益
您还没有登录,登录后您可以:
收藏Android系统代码
收藏喜欢的文章
多个平台共享账号
去登录
首次使用?从这里
注册