Lines Matching refs:std

52 static std::string CommandLine() {  in CommandLine()
53 std::vector<std::string> command; in CommandLine()
67 std::string error; in UsageErrorV()
144 static const std::string kMethodSep = "->";
145 static const std::string kMissingTypesMarker = "missing_types";
146 static const std::string kInvalidClassDescriptor = "invalid_class";
147 static const std::string kInvalidMethod = "invalid_method";
148 static const std::string kClassAllMethods = "*";
277 void OpenApkFilesFromLocations(std::vector<std::unique_ptr<const DexFile>>* dex_files) { in OpenApkFilesFromLocations()
292 std::string error_msg; in OpenApkFilesFromLocations()
293 std::vector<std::unique_ptr<const DexFile>> dex_files_for_location; in OpenApkFilesFromLocations()
315 for (std::unique_ptr<const DexFile>& dex_file : dex_files_for_location) { in OpenApkFilesFromLocations()
316 dex_files->emplace_back(std::move(dex_file)); in OpenApkFilesFromLocations()
321 int DumpOneProfile(const std::string& banner, in DumpOneProfile()
322 const std::string& filename, in DumpOneProfile()
324 const std::vector<std::unique_ptr<const DexFile>>* dex_files, in DumpOneProfile()
325 std::string* dump) { in DumpOneProfile()
338 std::string this_dump = banner + "\n" + info.DumpInfo(dex_files) + "\n"; in DumpOneProfile()
358 std::vector<std::unique_ptr<const DexFile>> dex_files; in DumpProfileInfo()
360 std::string dump; in DumpProfileInfo()
375 for (const std::string& profile_file : profile_files_) { in DumpProfileInfo()
404 std::cout << dump; in DumpProfileInfo()
419 std::vector<std::unique_ptr<const DexFile>>* dex_files, in GetClassNamesAndMethods()
420 std::set<std::string>* out_lines) { in GetClassNamesAndMethods()
426 for (const std::unique_ptr<const DexFile>& dex_file : *dex_files) { in GetClassNamesAndMethods()
427 std::set<dex::TypeIndex> class_types; in GetClassNamesAndMethods()
428 std::set<uint16_t> methods; in GetClassNamesAndMethods()
432 out_lines->insert(std::string(dex_file->GetTypeDescriptor(type_id))); in GetClassNamesAndMethods()
436 std::string signature_string(dex_file->GetMethodSignature(id).ToString()); in GetClassNamesAndMethods()
437 std::string type_string(dex_file->GetTypeDescriptor(dex_file->GetTypeId(id.class_idx_))); in GetClassNamesAndMethods()
438 std::string method_name(dex_file->GetMethodName(id)); in GetClassNamesAndMethods()
446 bool GetClassNamesAndMethods(const std::string& profile_file, in GetClassNamesAndMethods()
447 std::vector<std::unique_ptr<const DexFile>>* dex_files, in GetClassNamesAndMethods()
448 std::set<std::string>* out_lines) { in GetClassNamesAndMethods()
472 std::vector<std::unique_ptr<const DexFile>> dex_files; in DumpClasses()
475 std::set<std::string> class_names; in DumpClasses()
484 for (const std::string& profile_file : profile_files_) { in DumpClasses()
502 std::string dump; in DumpClasses()
503 for (const std::string& class_name : class_names) { in DumpClasses()
504 dump += class_name + std::string("\n"); in DumpClasses()
507 std::cout << dump; in DumpClasses()
525 const char* input_filename, std::function<std::string(const char*)>* process) { in ReadCommentedInputFromFile()
526 std::unique_ptr<std::ifstream> input_file(new std::ifstream(input_filename, std::ifstream::in)); in ReadCommentedInputFromFile()
531 std::unique_ptr<T> result( in ReadCommentedInputFromFile()
541 std::istream& in_stream, in ReadCommentedInputStream()
542 std::function<std::string(const char*)>* process) { in ReadCommentedInputStream()
543 std::unique_ptr<T> output(new T()); in ReadCommentedInputStream()
545 std::string dot; in ReadCommentedInputStream()
546 std::getline(in_stream, dot); in ReadCommentedInputStream()
551 std::string descriptor((*process)(dot.c_str())); in ReadCommentedInputStream()
563 bool FindClass(const std::vector<std::unique_ptr<const DexFile>>& dex_files, in FindClass()
564 const std::string& klass_descriptor, in FindClass()
566 constexpr uint16_t kInvalidTypeIndex = std::numeric_limits<uint16_t>::max() - 1; in FindClass()
567 for (const std::unique_ptr<const DexFile>& dex_file_ptr : dex_files) { in FindClass()
601 const std::string& method_spec) { in FindMethodIndex()
604 constexpr uint16_t kInvalidMethodIndex = std::numeric_limits<uint16_t>::max() - 1; in FindMethodIndex()
610 std::vector<std::string> name_and_signature; in FindMethodIndex()
617 const std::string& name = name_and_signature[0]; in FindMethodIndex()
618 const std::string& signature = kProfileParsingFirstCharInSignature + name_and_signature[1]; in FindMethodIndex()
626 std::vector<dex::TypeIndex> param_type_idxs; in FindMethodIndex()
691 bool ProcessLine(const std::vector<std::unique_ptr<const DexFile>>& dex_files, in ProcessLine()
692 const std::string& line, in ProcessLine()
694 std::string klass; in ProcessLine()
695 std::string method_str; in ProcessLine()
697 if (method_sep_index == std::string::npos) { in ProcessLine()
712 std::set<DexCacheResolvedClasses> resolved_class_set; in ProcessLine()
719 std::vector<ProfileMethodInfo> methods; in ProcessLine()
744 std::string method_spec; in ProcessLine()
745 std::vector<std::string> inline_cache_elems; in ProcessLine()
747 std::vector<std::string> method_elems; in ProcessLine()
768 std::vector<ProfileMethodInfo> pmi; in ProcessLine()
769 std::vector<ProfileMethodInfo::ProfileInlineCache> inline_caches; in ProcessLine()
775 std::vector<ProfileMethodInfo::ProfileClassReference> classes(inline_cache_elems.size()); in ProcessLine()
777 for (const std::string& ic_class : inline_cache_elems) { in ProcessLine()
786 profile->AddMethodsAndClasses(pmi, std::set<DexCacheResolvedClasses>()); in ProcessLine()
827 std::unique_ptr<std::unordered_set<std::string>> in CreateProfile()
828 user_lines(ReadCommentedInputFromFile<std::unordered_set<std::string>>( in CreateProfile()
832 std::vector<std::unique_ptr<const DexFile>> dex_files; in CreateProfile()
888 std::vector<std::unique_ptr<const DexFile>> dex_files; in GenerateTestProfile()
906 std::vector<int>* fds) { in ParseFdForCollection()
912 static void CloseAllFds(const std::vector<int>& fds, const char* descriptor) { in CloseAllFds()
928 std::vector<std::string> profile_files_;
929 std::vector<int> profile_files_fd_;
930 std::vector<std::string> dex_locations_;
931 std::vector<std::string> apk_files_;
932 std::vector<int> apks_fd_;
933 std::string reference_profile_file_;
938 std::string test_profile_;
939 std::string create_profile_from_file_;