1 Star 1 Fork 0

Rong Tao/autofdo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
profile_symbol_list.h 1.75 KB
一键复制 编辑 原始数据 按行查看 历史
Wei Mi 提交于 2021-05-09 10:38 . Update to latest internal version.
// utility to process profile symbol list.
#ifndef AUTOFDO_PROFILE_SYMBOL_LIST_H_
#define AUTOFDO_PROFILE_SYMBOL_LIST_H_
#include <cstdint>
#include <utility>
#include <vector>
#include "symbol_map.h"
#include "llvm/ProfileData/SampleProf.h"
// Common flags used by most autofdo tools.
#define AUTOFDO_PROFILE_SYMBOL_LIST_FLAGS \
ABSL_FLAG( \
double, symbol_list_size_coverage_ratio, 1.0, \
"List the largest function symbols where their sizes contribute to " \
"k percent of the total sizes " \
"(k=100*symbol_list_size_coverage_ratio). E.g., when " \
"this is 0.0, no function symbol is listed; when this is 1.0, all " \
"function symbols are listed." \
"Please use the flag with caution if your tool could allow " \
"different values for different targets -- the flag will override " \
"them with a single value. "); \
ABSL_FLAG(bool, compress_symbol_list, true, \
"whether to compress the symbol list.");
namespace devtools_crosstool_autofdo {
// Vector of pairs containing symbol name and size.
using SymbolList = std::vector<std::pair<llvm::StringRef, uint64_t>>;
void fillProfileSymbolList(llvm::sampleprof::ProfileSymbolList *prof_sym_list,
const NameSizeList &name_size_list,
const SymbolMap *symbol_map,
double symbol_list_size_coverage_ratio = -1.0);
} // namespace devtools_crosstool_autofdo
#endif // AUTOFDO_PROFILE_SYMBOL_LIST_H_
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/rtoax/autofdo.git
git@gitee.com:rtoax/autofdo.git
rtoax
autofdo
autofdo
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385