/bionic/libc/include/ |
D | stdatomic.h | 55 #define _Atomic(t) std::atomic<t> 57 using std::atomic_is_lock_free; 58 using std::atomic_init; 59 using std::atomic_store; 60 using std::atomic_store_explicit; 61 using std::atomic_load; 62 using std::atomic_load_explicit; 63 using std::atomic_exchange; 64 using std::atomic_exchange_explicit; 65 using std::atomic_compare_exchange_strong; [all …]
|
/bionic/linker/ |
D | linker_namespaces.h | 37 std::vector<std::string> fix_lib_paths(std::vector<std::string> paths); 44 const std::unordered_set<std::string>& shared_lib_sonames, in android_namespace_link_t() 54 const std::unordered_set<std::string>& shared_lib_sonames() const { in shared_lib_sonames() 71 const std::unordered_set<std::string> shared_lib_sonames_; 94 const std::vector<std::string>& get_ld_library_paths() const { in get_ld_library_paths() 97 void set_ld_library_paths(std::vector<std::string>&& library_paths) { in set_ld_library_paths() 98 ld_library_paths_ = std::move(library_paths); in set_ld_library_paths() 101 const std::vector<std::string>& get_default_library_paths() const { in get_default_library_paths() 104 void set_default_library_paths(std::vector<std::string>&& library_paths) { in set_default_library_paths() 105 default_library_paths_ = fix_lib_paths(std::move(library_paths)); in set_default_library_paths() [all …]
|
D | linker_config.h | 52 NamespaceLinkConfig(const std::string& ns_name, const std::string& shared_libs, in NamespaceLinkConfig() 57 const std::string& ns_name() const { in ns_name() 61 const std::string& shared_libs() const { in shared_libs() 70 std::string ns_name_; 71 std::string shared_libs_; 77 explicit NamespaceConfig(const std::string& name) in NamespaceConfig() 93 const std::vector<std::string>& search_paths() const { in search_paths() 97 const std::vector<std::string>& permitted_paths() const { in permitted_paths() 101 const std::vector<std::string>& whitelisted_libs() const { in whitelisted_libs() 105 const std::vector<NamespaceLinkConfig>& links() const { in links() [all …]
|
D | linker_config.cpp | 62 explicit ConfigParser(std::string&& content) in ConfigParser() 63 : content_(std::move(content)), p_(0), lineno_(0), was_end_of_file_(false) {} in ConfigParser() 73 int next_token(std::string* name, std::string* value, std::string* error_msg) { in next_token() 74 std::string line; in next_token() 90 if (found_assign != std::string::npos && found_append == std::string::npos) { in next_token() 96 if (found_append != std::string::npos) { in next_token() 102 *error_msg = std::string("invalid format: ") + in next_token() 119 bool NextLine(std::string* line) { in NextLine() 120 if (p_ == std::string::npos) { in NextLine() 125 if (found != std::string::npos) { in NextLine() [all …]
|
D | linker_config_test.cpp | 97 static bool write_version(const std::string& path, uint32_t version) { in write_version() 98 std::string content = android::base::StringPrintf("%d", version); in write_version() 102 static std::vector<std::string> resolve_paths(std::vector<std::string> paths) { in resolve_paths() 103 std::vector<std::string> resolved_paths; in resolve_paths() 109 const std::vector<std::string> kExpectedDefaultSearchPath = in run_linker_config_smoke_test() 110 resolve_paths(is_asan ? std::vector<std::string>({ "/data", "/vendor/lib" ARCH_SUFFIX }) : in run_linker_config_smoke_test() 111 std::vector<std::string>({ "/vendor/lib" ARCH_SUFFIX })); in run_linker_config_smoke_test() 113 const std::vector<std::string> kExpectedDefaultPermittedPath = in run_linker_config_smoke_test() 114 resolve_paths(is_asan ? std::vector<std::string>({ "/data", "/vendor" }) : in run_linker_config_smoke_test() 115 std::vector<std::string>({ "/vendor/lib" ARCH_SUFFIX })); in run_linker_config_smoke_test() [all …]
|
D | linker_utils.h | 36 void format_string(std::string* str, const std::vector<std::pair<std::string, std::string>>& params… 38 bool file_is_in_dir(const std::string& file, const std::string& dir); 39 bool file_is_under_dir(const std::string& file, const std::string& dir); 40 bool normalize_path(const char* path, std::string* normalized_path); 41 bool parse_zip_path(const char* input_path, std::string* zip_path, std::string* entry_path); 48 void resolve_paths(std::vector<std::string>& paths, 49 std::vector<std::string>* resolved_paths); 52 std::string resolve_path(const std::string& path); 54 void split_path(const char* path, const char* delimiters, std::vector<std::string>* paths); 56 std::string dirname(const char* path);
|
D | linker_utils.cpp | 39 void format_string(std::string* str, const std::vector<std::pair<std::string, std::string>>& params… in format_string() 43 if (pos == std::string::npos) break; in format_string() 45 const std::string& token = param.first; in format_string() 46 const std::string& replacement = param.second; in format_string() 63 std::string dirname(const char* path) { in dirname() 71 return std::string(path, last_slash - path); in dirname() 75 bool normalize_path(const char* path, std::string* normalized_path) { in normalize_path() 119 bool file_is_in_dir(const std::string& file, const std::string& dir) { in file_is_in_dir() 129 bool file_is_under_dir(const std::string& file, const std::string& dir) { in file_is_under_dir() 140 bool parse_zip_path(const char* input_path, std::string* zip_path, std::string* entry_path) { in parse_zip_path() [all …]
|
/bionic/libc/malloc_debug/ |
D | Config.h | 75 const std::string& backtrace_dump_prefix() const { return backtrace_dump_prefix_; } in backtrace_dump_prefix() 94 const std::string& record_allocs_file() const { return record_allocs_file_; } in record_allocs_file() 99 bool (Config::*process_func)(const std::string&, const std::string&); 102 bool ParseValue(const std::string& option, const std::string& value, size_t default_value, 105 bool ParseValue(const std::string& option, const std::string& value, size_t min_value, 108 bool SetGuard(const std::string& option, const std::string& value); 109 bool SetFrontGuard(const std::string& option, const std::string& value); 110 bool SetRearGuard(const std::string& option, const std::string& value); 112 bool SetFill(const std::string& option, const std::string& value); 113 bool SetFillOnAlloc(const std::string& option, const std::string& value); [all …]
|
D | Config.cpp | 71 const std::unordered_map<std::string, Config::OptionInfo> Config::kOptions = { 143 bool Config::ParseValue(const std::string& option, const std::string& value, size_t min_value, in ParseValue() 184 bool Config::ParseValue(const std::string& option, const std::string& value, size_t default_value, in ParseValue() 193 bool Config::SetGuard(const std::string& option, const std::string& value) { in SetGuard() 211 bool Config::SetFrontGuard(const std::string& option, const std::string& value) { in SetFrontGuard() 221 bool Config::SetRearGuard(const std::string& option, const std::string& value) { in SetRearGuard() 225 bool Config::SetFill(const std::string& option, const std::string& value) { in SetFill() 240 bool Config::SetFillOnAlloc(const std::string& option, const std::string& value) { in SetFillOnAlloc() 244 bool Config::SetFillOnFree(const std::string& option, const std::string& value) { in SetFillOnFree() 248 bool Config::SetBacktrace(const std::string& option, const std::string& value) { in SetBacktrace() [all …]
|
D | PointerData.cpp | 58 std::atomic_uint8_t PointerData::backtrace_enabled_; 59 std::atomic_bool PointerData::backtrace_dump_; 61 std::mutex PointerData::pointer_mutex_; 62 std::unordered_map<uintptr_t, PointerInfoType> PointerData::pointers_ GUARDED_BY( 65 std::mutex PointerData::frame_mutex_; 66 std::unordered_map<FrameKeyType, size_t> PointerData::key_to_index_ GUARDED_BY( 68 std::unordered_map<size_t, FrameInfoType> PointerData::frames_ GUARDED_BY(PointerData::frame_mutex_… 69 std::unordered_map<size_t, std::vector<unwindstack::LocalFrameData>> PointerData::backtraces_info_ … 73 std::mutex PointerData::free_pointer_mutex_; 74 std::deque<FreePointerInfoType> PointerData::free_pointers_ GUARDED_BY( [all …]
|
D | PointerData.h | 67 namespace std { 70 std::size_t operator()(const FrameKeyType& key) const { 71 std::size_t cur_hash = key.frames[0]; 84 std::vector<uintptr_t> frames; 112 std::vector<unwindstack::LocalFrameData>* backtrace_info; 143 typedef std::unordered_map<uintptr_t, PointerInfoType>::iterator iterator; 153 static void GetAllocList(std::vector<ListInfoType>* list); 165 static std::string GetHashString(uintptr_t* frames, size_t num_frames); 168 static void GetList(std::vector<ListInfoType>* list, bool only_with_backtrace); 169 static void GetUniqueList(std::vector<ListInfoType>* list, bool only_with_backtrace); [all …]
|
/bionic/tools/versioner/src/ |
D | SymbolFileParser.cpp | 35 using TagList = std::vector<std::string>; 38 std::string name; 42 using SymbolList = std::vector<SymbolEnt>; 45 std::string name; 46 std::string base; 53 SymbolFileParser(const std::string& path, const CompilationType& type) in SymbolFileParser() 58 file(path, std::ios_base::in), in SymbolFileParser() 63 std::optional<SymbolMap> parse() { in parse() 65 return std::nullopt; in parse() 72 return std::nullopt; in parse() [all …]
|
D | versioner.cpp | 61 using namespace std::chrono_literals; 62 using namespace std::string_literals; 86 std::string header_path; 87 std::string dependency_dir; 89 std::unordered_set<std::string> ignored_directories; 93 static bool is_dir(const std::string& path) { in is_dir() 100 std::vector<std::string> headers = in collectRequirements() 102 std::vector<std::string> dependencies; in collectRequirements() 109 auto collect_children = [&dependencies](const std::string& dir_path) { in collectRequirements() 122 std::string dependency = dir_path + "/" + dent->d_name; in collectRequirements() [all …]
|
D | Preprocessor.cpp | 42 using namespace std::string_literals; 79 std::string arch_visibility_str; in calculateRequiredGuard() 84 arch_visibility_str += std::to_string(arch_visibility[arch]); in calculateRequiredGuard() 112 static std::deque<std::string> readFileLines(const std::string& path) { in readFileLines() 113 std::ifstream is(path.c_str()); in readFileLines() 114 std::deque<std::string> result; in readFileLines() 115 std::string line; in readFileLines() 117 while (std::getline(is, line)) { in readFileLines() 118 result.push_back(std::move(line)); in readFileLines() 124 static void writeFileLines(const std::string& path, const std::deque<std::string>& lines) { in writeFileLines() [all …]
|
D | Utils.h | 30 std::string getWorkingDir(); 31 std::vector<std::string> collectHeaders(const std::string& directory, 32 const std::unordered_set<std::string>& ignored_directories); 34 static inline std::string dirname(const std::string& path) { in dirname() 35 std::unique_ptr<char, decltype(&free)> path_copy(strdup(path.c_str()), free); in dirname() 39 static inline bool is_directory(const std::string& path) { in is_directory() 47 static inline bool mkdirs(const std::string& path) { in mkdirs() 52 std::string parent = dirname(path); in mkdirs() 71 static inline std::string to_string(const char* c) { in to_string() 75 static inline const std::string& to_string(const std::string& str) { in to_string() [all …]
|
D | SymbolDatabase.cpp | 40 std::unordered_set<std::string> getSymbols(const std::string& filename) { in getSymbols() 41 std::unordered_set<std::string> result; in getSymbols() 67 static std::map<std::string, NdkSymbolType> parsePlatform(const CompilationType& type, in parsePlatform() 68 const std::string& platform_dir) { in parsePlatform() 69 static const std::pair<const char*, bool> wanted_files[] = { in parsePlatform() 74 std::map<std::string, NdkSymbolType> result; in parsePlatform() 77 std::string path = platform_dir + "/" + filename; in parsePlatform() 79 std::optional<SymbolMap> symbols = parseSymbolFile(path, type); in parsePlatform() 105 std::optional<NdkSymbolDatabase> parsePlatforms(const std::set<CompilationType>& types, in parsePlatforms() 106 const std::string& platform_dir) { in parsePlatforms() [all …]
|
D | Driver.cpp | 51 using namespace std::chrono_literals; 52 using namespace std::string_literals; 79 std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance&, llvm::StringRef) override { in CreateASTConsumer() 80 return std::make_unique<VersionerASTConsumer>(header_database, type); in CreateASTConsumer() 86 auto diag_printer = std::make_unique<TextDiagnosticPrinter>(llvm::errs(), diag_opts.get()); in constructDiags() 95 static std::unordered_map<CompilationType, std::vector<std::string>> cc1_flags; 99 const std::vector<std::string>& include_dirs) { in generateTargetCC1Flags() 100 std::vector<std::string> cmd = { "versioner" }; in generateTargetCC1Flags() 129 cmd.push_back("-D__ANDROID_API__="s + std::to_string(type.api_level)); in generateTargetCC1Flags() 132 cmd.push_back("-D_FILE_OFFSET_BITS="s + std::to_string(type.file_offset_bits)); in generateTargetCC1Flags() [all …]
|
D | DeclarationDatabase.h | 54 return std::tie(introduced, deprecated, obsoleted) == 55 std::tie(rhs.introduced, rhs.deprecated, rhs.obsoleted); 63 std::string to_string(const AvailabilityValues& av); 84 return std::tie(global_availability, arch_availability) == 85 std::tie(rhs.global_availability, rhs.arch_availability); 96 std::string to_string(const DeclarationAvailability& decl_av); 103 return std::tie(line, column) < std::tie(rhs.line, rhs.column); 107 return std::tie(line, column) == std::tie(rhs.line, rhs.column); 112 std::string filename; 117 return std::tie(filename, start, end) < std::tie(rhs.filename, rhs.start, rhs.end); [all …]
|
D | SymbolDatabase.h | 27 using LibrarySymbolDatabase = std::unordered_set<std::string>; 28 std::unordered_set<std::string> getSymbols(const std::string& filename); 35 using NdkSymbolDatabase = std::map<std::string, std::map<CompilationType, NdkSymbolType>>; 36 std::optional<NdkSymbolDatabase> parsePlatforms(const std::set<CompilationType>& types, 37 const std::string& platform_dir);
|
/bionic/benchmarks/tests/ |
D | interface_test.cpp | 40 void Exec(std::vector<const char*> args); 41 void RunTest(int expected_exitcode, std::vector<const char*> extra_args = {}); 42 void Verify(const std::string& expected_output, int expected_exitcode, 43 std::vector<const char*> extra_args = {}, bool sanitize = true); 45 std::string raw_output_; 46 std::string sanitized_output_; 60 static std::string GetBionicXmlArg(const char* xml_file) { in GetBionicXmlArg() 66 sanitized_output_ = std::regex_replace(raw_output_, std::regex(".*(BM_\\S+)\\s+.+"), "$1"); in SanitizeOutput() 78 void SystemTests::Exec(std::vector<const char*> args) { in Exec() 104 void SystemTests::Verify(const std::string& expected_output, in Verify() [all …]
|
/bionic/tests/ |
D | __cxa_thread_atexit_test.cpp | 23 static std::string class_with_dtor_output; 27 void set_message(const std::string& msg) { in set_message() 35 std::string message; 41 class_with_dtor.set_message(*static_cast<std::string*>(arg)); in thread_nop() 46 std::string msg("dtor called."); in TEST() 55 void set_message(const std::string& msg) { in set_message() 63 std::string message; 79 std::string* call_sequence = static_cast<std::string*>(arg); in thread_atexit_fn1() 84 std::string* call_sequence = static_cast<std::string*>(arg); in thread_atexit_fn2() 89 std::string* call_sequence = static_cast<std::string*>(arg); in thread_atexit_from_atexit() [all …]
|
D | dl_test.cpp | 116 std::string usage_prefix = std::string("Usage: ") + path_to_linker; in TEST() 127 std::string helper = GetTestlibRoot() + in TEST() 129 std::string expected_output = in TEST() 143 std::string helper = GetTestlibRoot() + in TEST() 145 std::string expected_output = in TEST() 159 std::string error_message = "error: linker cannot load itself\n"; in TEST() 169 std::string helper = GetTestlibRoot() + in TEST() 181 std::string helper = GetTestlibRoot() + in TEST() 196 std::string helper = GetTestlibRoot() + in TEST() 207 std::string helper = GetTestlibRoot() + in TEST() [all …]
|
/bionic/benchmarks/ |
D | util.h | 29 extern std::mutex g_map_lock; 31 extern std::map<std::string, std::pair<benchmark_func_t, std::string>> g_str_to_func; 33 … __attribute__((unused)) EmplaceBenchmark(const std::string& fn_name, benchmark_func_t fn_ptr, con… 35 g_str_to_func.emplace(std::string(fn_name), std::make_pair(fn_ptr, arg)); 41 …int _bionic_benchmark_##n __attribute__((unused)) = EmplaceBenchmark(std::string(#n), reinterpret_… 44 …int _bionic_benchmark_##n __attribute__((unused)) = EmplaceBenchmark(std::string(#n), reinterpret_… 59 std::string xmlpath; 60 std::vector<std::string> extra_benchmarks; 66 char* GetAlignedPtr(std::vector<char>* buf, size_t alignment, size_t nbytes); 68 wchar_t* GetAlignedPtr(std::vector<wchar_t>* buf, size_t alignment, size_t nbytes); [all …]
|
D | bionic_benchmarks.cpp | 40 static const std::vector<int> kCommonSizes{ 54 static const std::vector<int> kSmallSizes{ 63 static const std::vector<int> kMediumSizes{ 73 static const std::vector<int> kLargeSizes{ 80 static std::map<std::string, const std::vector<int> &> kSizes{ 86 std::map<std::string, std::pair<benchmark_func_t, std::string>> g_str_to_func; 88 std::mutex g_map_lock; 100 typedef std::vector<std::vector<int64_t>> args_vector_t; 121 void SanitizeOpts(int argc, char** argv, std::vector<char*>* new_argv) { in SanitizeOpts() 227 static bool ParseOnebufManualStr(std::string& arg, args_vector_t* to_populate) { in ParseOnebufManualStr() [all …]
|
D | atomic_benchmark.cpp | 42 std::atomic<int> test_loc(0); 46 static std::mutex mtx; 58 result += test_loc.load(std::memory_order_relaxed); in BM_atomic_load_relaxed() 68 result += test_loc.load(std::memory_order_acquire); in BM_atomic_load_acquire() 78 test_loc.store(++i, std::memory_order_release); in BM_atomic_store_release() 87 test_loc.store(++i, std::memory_order_seq_cst); in BM_atomic_store_seq_cst() 96 result += test_loc.fetch_add(1, std::memory_order_relaxed); in BM_atomic_fetch_add_relaxed() 106 result += test_loc.fetch_add(1, std::memory_order_seq_cst); in BM_atomic_fetch_add_seq_cst() 119 result += test_loc.load(std::memory_order_relaxed); in BM_atomic_acquire_fence() 120 std::atomic_thread_fence(std::memory_order_acquire); in BM_atomic_acquire_fence() [all …]
|