/bionic/linker/tests/ |
D | linker_config_test.cpp | 69 static bool write_version(const std::string& path, uint32_t version) { in write_version() 70 std::string content = android::base::StringPrintf("%d", version); in write_version() 76 const std::vector<std::string> kExpectedDefaultSearchPath = is_asan ? in run_linker_config_smoke_test() 77 std::vector<std::string>({ "/data", "/vendor/lib64"}) : in run_linker_config_smoke_test() 78 std::vector<std::string>({ "/vendor/lib64" }); in run_linker_config_smoke_test() 80 const std::vector<std::string> kExpectedDefaultPermittedPath = is_asan ? in run_linker_config_smoke_test() 81 std::vector<std::string>({ "/data", "/vendor" }) : in run_linker_config_smoke_test() 82 std::vector<std::string>({ "/vendor/lib64" }); in run_linker_config_smoke_test() 84 const std::vector<std::string> kExpectedSystemSearchPath = is_asan ? in run_linker_config_smoke_test() 85 std::vector<std::string>({ "/data", "/system/lib64" }) : in run_linker_config_smoke_test() [all …]
|
/bionic/linker/ |
D | linker_utils.h | 37 void format_string(std::string* str, const std::vector<std::pair<std::string, std::string>>& params… 39 bool file_is_in_dir(const std::string& file, const std::string& dir); 40 bool file_is_under_dir(const std::string& file, const std::string& dir); 41 bool normalize_path(const char* path, std::string* normalized_path); 42 bool parse_zip_path(const char* input_path, std::string* zip_path, std::string* entry_path); 49 void resolve_paths(std::vector<std::string>& paths, 50 std::vector<std::string>* resolved_paths); 52 void split_path(const char* path, const char* delimiters, std::vector<std::string>* paths); 54 std::string dirname(const char* path);
|
D | linker_config.h | 46 NamespaceLinkConfig(const std::string& ns_name, const std::string& shared_libs) in NamespaceLinkConfig() 49 const std::string& ns_name() const { in ns_name() 53 const std::string& shared_libs() const { in shared_libs() 58 std::string ns_name_; 59 std::string shared_libs_; 64 explicit NamespaceConfig(const std::string& name) in NamespaceConfig() 80 const std::vector<std::string>& search_paths() const { in search_paths() 84 const std::vector<std::string>& permitted_paths() const { in permitted_paths() 88 const std::vector<NamespaceLinkConfig>& links() const { in links() 92 void add_namespace_link(const std::string& ns_name, const std::string& shared_libs) { in add_namespace_link() [all …]
|
D | linker_namespaces.h | 43 const std::unordered_set<std::string>& shared_lib_sonames) in android_namespace_link_t() 51 const std::unordered_set<std::string>& shared_lib_sonames() const { in shared_lib_sonames() 61 const std::unordered_set<std::string> shared_lib_sonames_; 77 const std::vector<std::string>& get_ld_library_paths() const { in get_ld_library_paths() 80 void set_ld_library_paths(std::vector<std::string>&& library_paths) { in set_ld_library_paths() 84 const std::vector<std::string>& get_default_library_paths() const { in get_default_library_paths() 87 void set_default_library_paths(std::vector<std::string>&& library_paths) { in set_default_library_paths() 90 void set_default_library_paths(const std::vector<std::string>& library_paths) { in set_default_library_paths() 94 const std::vector<std::string>& get_permitted_paths() const { in get_permitted_paths() 97 void set_permitted_paths(std::vector<std::string>&& permitted_paths) { in set_permitted_paths() [all …]
|
D | linker_config.cpp | 54 explicit ConfigParser(std::string&& content) in ConfigParser() 64 int next_token(std::string* name, std::string* value, std::string* error_msg) { in next_token() 65 std::string line; in next_token() 80 if (found == std::string::npos) { in next_token() 81 *error_msg = std::string("invalid format: ") + in next_token() 103 bool NextLine(std::string* line) { in NextLine() 104 if (p_ == std::string::npos) { in NextLine() 109 if (found != std::string::npos) { in NextLine() 114 p_ = std::string::npos; in NextLine() 121 std::string content_; [all …]
|
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/tools/versioner/src/ |
D | SymbolDatabase.h | 26 using LibrarySymbolDatabase = std::unordered_set<std::string>; 27 std::unordered_set<std::string> getSymbols(const std::string& filename); 34 using NdkSymbolDatabase = std::map<std::string, std::map<CompilationType, NdkSymbolType>>; 35 NdkSymbolDatabase parsePlatforms(const std::set<CompilationType>& types, 36 const std::string& platform_dir);
|
D | SymbolDatabase.cpp | 38 std::unordered_set<std::string> getSymbols(const std::string& filename) { in getSymbols() 39 std::unordered_set<std::string> result; in getSymbols() 68 static std::string readPlatformFile(const CompilationType& type, llvm::StringRef platform_dir, in readPlatformFile() 69 const std::string& filename, bool required) { in readPlatformFile() 71 std::ifstream stream; in readPlatformFile() 78 std::string path = std::string(platform_dir) + "/android-" + std::to_string(api_level) + in readPlatformFile() 81 stream = std::ifstream(path); in readPlatformFile() 83 return std::string(std::istreambuf_iterator<char>(stream), std::istreambuf_iterator<char>()); in readPlatformFile() 93 return std::string(); in readPlatformFile() 96 static std::map<std::string, NdkSymbolType> parsePlatform(const CompilationType& type, in parsePlatform() [all …]
|
D | Utils.h | 29 std::string getWorkingDir(); 30 std::vector<std::string> collectHeaders(const std::string& directory); 32 static inline std::string dirname(const std::string& path) { in dirname() 33 std::unique_ptr<char, decltype(&free)> path_copy(strdup(path.c_str()), free); in dirname() 37 static inline bool is_directory(const std::string& path) { in is_directory() 45 static inline bool mkdirs(const std::string& path) { in mkdirs() 50 std::string parent = dirname(path); in mkdirs() 69 static inline std::string to_string(const char* c) { in to_string() 73 static inline const std::string& to_string(const std::string& str) { in to_string() 78 static inline std::string Join(Collection c, const std::string& delimiter = ", ") { [all …]
|
D | Driver.h | 30 std::vector<std::string> headers; 31 std::vector<std::string> dependencies; 35 const std::set<CompilationType>& types, 36 const std::unordered_map<Arch, CompilationRequirements>& reqs); 40 const std::string& filename);
|
D | Driver.cpp | 50 using namespace std::chrono_literals; 51 using namespace std::string_literals; 78 std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance&, llvm::StringRef) override { in CreateASTConsumer() 79 return std::make_unique<VersionerASTConsumer>(header_database, type); in CreateASTConsumer() 85 auto diag_printer = std::make_unique<TextDiagnosticPrinter>(llvm::errs(), diag_opts.get()); in constructDiags() 94 static std::unordered_map<CompilationType, std::vector<std::string>> cc1_flags; 98 const std::vector<std::string>& include_dirs) { in generateTargetCC1Flags() 99 std::vector<std::string> cmd = { "versioner" }; in generateTargetCC1Flags() 119 cmd.push_back("-D__ANDROID_API__="s + std::to_string(type.api_level)); in generateTargetCC1Flags() 122 cmd.push_back("-D_FILE_OFFSET_BITS="s + std::to_string(type.file_offset_bits)); in generateTargetCC1Flags() [all …]
|
D | versioner.cpp | 57 using namespace std::chrono_literals; 58 using namespace std::string_literals; 80 static CompilationRequirements collectRequirements(const Arch& arch, const std::string& header_dir, in collectRequirements() 81 const std::string& dependency_dir) { in collectRequirements() 82 std::vector<std::string> headers = collectHeaders(header_dir); in collectRequirements() 83 std::vector<std::string> dependencies = { header_dir }; in collectRequirements() 85 auto collect_children = [&dependencies, &dependency_dir](const std::string& dir_path) { in collectRequirements() 98 std::string dependency = dir_path + "/" + dent->d_name; in collectRequirements() 119 auto new_end = std::remove_if(headers.begin(), headers.end(), [&arch](llvm::StringRef header) { in collectRequirements() 138 static std::set<CompilationType> generateCompilationTypes(const std::set<Arch> selected_architectur… in generateCompilationTypes() [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 | DeclarationDatabase.h | 55 return std::tie(introduced, deprecated, obsoleted) == 56 std::tie(rhs.introduced, rhs.deprecated, rhs.obsoleted); 64 std::string to_string(const AvailabilityValues& av); 85 return std::tie(global_availability, arch_availability) == 86 std::tie(rhs.global_availability, rhs.arch_availability); 97 std::string to_string(const DeclarationAvailability& decl_av); 104 return std::tie(line, column) < std::tie(rhs.line, rhs.column); 108 return std::tie(line, column) == std::tie(rhs.line, rhs.column); 113 std::string filename; 118 return std::tie(filename, start, end) < std::tie(rhs.filename, rhs.start, rhs.end); [all …]
|
D | versioner.h | 36 static const std::unordered_map<std::string, std::set<Arch>> header_blacklist = { 44 static const std::unordered_set<std::string> missing_symbol_whitelist = {
|
D | Utils.cpp | 32 std::string getWorkingDir() { in getWorkingDir() 40 std::vector<std::string> collectHeaders(const std::string& directory) { in collectHeaders() 41 std::vector<std::string> headers; in collectHeaders() 44 std::unique_ptr<FTS, decltype(&fts_close)> fts( in collectHeaders()
|
/bionic/libc/bionic/ |
D | new.cpp | 24 const std::nothrow_t std::nothrow = {}; 26 void* operator new(std::size_t size) { in operator new() 34 void* operator new[](std::size_t size) { in operator new[]() 50 void* operator new(std::size_t size, const std::nothrow_t&) { in operator new() 54 void* operator new[](std::size_t size, const std::nothrow_t&) { in operator new[]() 58 void operator delete(void* ptr, const std::nothrow_t&) throw() { in operator delete() 62 void operator delete[](void* ptr, const std::nothrow_t&) throw() { in operator delete[]()
|
/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 | dlfcn_symlink_support.cpp | 39 const std::string suffix = std::string("/") + source_file_name; in dl_callback() 48 std::string* path = reinterpret_cast<std::string*>(data); in dl_callback() 56 void create_dlfcn_test_symlink(const char* suffix, std::string* result) { in create_dlfcn_test_symlink() 58 std::string source_file_path; in create_dlfcn_test_symlink() 65 std::vector<char> buf; in create_dlfcn_test_symlink() 66 std::copy(source_file_path.begin(), source_file_path.end(), std::back_inserter(buf)); in create_dlfcn_test_symlink() 69 std::string path_dir = dirname(&buf[0]); in create_dlfcn_test_symlink() 70 std::string link_path = path_dir + "/" + symlink_name_prefix + suffix + ".so"; in create_dlfcn_test_symlink() 76 void remove_dlfcn_test_symlink(const std::string& path) { in remove_dlfcn_test_symlink()
|
D | sstream_test.cpp | 27 std::stringstream ss(value); in CheckOverflow() 43 CheckOverflow<int16_t>(std::numeric_limits<int16_t>::min(), "-32768", false); in TEST() 45 CheckOverflow<int16_t>(std::numeric_limits<int16_t>::max(), "32767", false); in TEST() 48 CheckOverflow<uint16_t>(std::numeric_limits<uint16_t>::max(), "65535", false); in TEST() 53 CheckOverflow<int32_t>(std::numeric_limits<int32_t>::min(), "-2147483648", false); in TEST() 55 CheckOverflow<int32_t>(std::numeric_limits<int32_t>::max(), "2147483647", false); in TEST() 58 CheckOverflow<uint32_t>(std::numeric_limits<uint32_t>::max(), "4294967295", false); in TEST() 63 CheckOverflow<int64_t>(std::numeric_limits<int64_t>::min(), "-9223372036854775808", false); in TEST() 65 CheckOverflow<int64_t>(std::numeric_limits<int64_t>::max(), "9223372036854775807", false); in TEST() 68 CheckOverflow<uint64_t>(std::numeric_limits<uint64_t>::max(), "18446744073709551615", false); in TEST()
|
D | gtest_globals.cpp | 26 static std::string init_testlib_root() { in init_testlib_root() 28 std::string path = get_executable_path(); in init_testlib_root() 33 std::string out_path; in init_testlib_root() 41 std::string real_path; in init_testlib_root() 50 const std::string& get_testlib_root() { in get_testlib_root() 51 static const std::string testlib_root = init_testlib_root(); in get_testlib_root()
|
/bionic/libc/include/ |
D | stdatomic.h | 59 #define _Atomic(t) std::atomic<t> 61 using std::atomic_is_lock_free; 62 using std::atomic_init; 63 using std::atomic_store; 64 using std::atomic_store_explicit; 65 using std::atomic_load; 66 using std::atomic_load_explicit; 67 using std::atomic_exchange; 68 using std::atomic_exchange_explicit; 69 using std::atomic_compare_exchange_strong; [all …]
|
/bionic/tools/relocation_packer/src/ |
D | debug.cc | 25 std::ostream* log = severity_ == INFO ? info_stream_ : error_stream_; in ~Logger() 26 std::string tag; in ~Logger() 34 *log << tag << ": " << stream_.str() << std::endl; in ~Logger() 44 info_stream_ = &std::cout; in Reset() 45 error_stream_ = &std::cerr; in Reset() 52 std::ostream* Logger::info_stream_ = &std::cout; 53 std::ostream* Logger::error_stream_ = &std::cerr;
|
/bionic/benchmarks/ |
D | atomic_benchmark.cpp | 40 std::atomic<int> test_loc(0); 44 std::mutex mtx; 56 result += test_loc.load(std::memory_order_relaxed); in BM_load_relaxed() 66 result += test_loc.load(std::memory_order_acquire); in BM_load_acquire() 76 test_loc.store(++i, std::memory_order_release); in BM_store_release() 85 test_loc.store(++i, std::memory_order_seq_cst); in BM_store_seq_cst() 94 result += test_loc.fetch_add(1, std::memory_order_relaxed); in BM_fetch_add_relaxed() 104 result += test_loc.fetch_add(1, std::memory_order_seq_cst); in BM_fetch_add_seq_cst() 117 result += test_loc.load(std::memory_order_relaxed); in BM_acquire_fence() 118 std::atomic_thread_fence(std::memory_order_acquire); in BM_acquire_fence() [all …]
|
/bionic/libstdc++/include/ |
D | new | 9 namespace std { 15 void* operator new(std::size_t); 16 void* operator new(std::size_t, const std::nothrow_t&); 18 // TODO: void operator delete(void*, std::size_t) throw(); 19 void operator delete(void*, const std::nothrow_t&) throw(); 21 void* operator new[](std::size_t); 22 void* operator new[](std::size_t, const std::nothrow_t&); 24 // TODO: void operator delete[](void*, std::size_t) throw(); 25 void operator delete[](void*, const std::nothrow_t&) throw(); 28 inline void* operator new(std::size_t, void* p) { return p; } [all …]
|