Lines Matching refs:string
18 #include <string>
171 // Constructed a dex file with code info followed by string data and hex edited.
226 static std::vector<std::string> DefaultCompactDexOption() {
228 std::vector<std::string>{"-x", "fast"} : std::vector<std::string>{"-x", "none"};
254 std::string GetDexLayoutPath() {
259 bool FullPlainOutputExec(std::string* error_msg) {
262 const std::string& dexdump_filename = dexdump_output.GetFilename();
263 std::string dexdump = GetTestAndroidRoot() + "/bin/dexdump2";
267 const std::string& dexlayout_filename = dexlayout_output.GetFilename();
269 for (const std::string &dex_file : GetLibCoreDexFileNames()) {
270 std::vector<std::string> dexdump_exec_argv =
272 std::vector<std::string> dexlayout_args =
280 std::vector<std::string> diff_exec_argv =
290 bool DexFileOutputExec(std::string* error_msg) {
292 const std::string& tmp_name = tmp_file.GetFilename();
294 std::string tmp_dir = tmp_name.substr(0, tmp_last_slash + 1);
296 for (const std::string &dex_file : GetLibCoreDexFileNames()) {
297 std::vector<std::string> dexlayout_args =
303 std::string dex_file_name = dex_file.substr(dex_file_last_slash + 1);
304 std::vector<std::string> unzip_exec_argv =
309 std::vector<std::string> diff_exec_argv =
325 void CreateProfile(const std::string& input_dex,
326 const std::string& out_profile,
327 const std::string& dex_location) {
329 std::string error_msg;
388 bool DexFileLayoutExec(std::string* error_msg) {
390 const std::string& tmp_name = tmp_file.GetFilename();
392 std::string tmp_dir = tmp_name.substr(0, tmp_last_slash + 1);
395 std::string dex_file = tmp_dir + "classes.dex";
397 std::string profile_file = tmp_dir + "primary.prof";
400 std::string output_dex = tmp_dir + "classes.dex.new";
402 std::vector<std::string> dexlayout_args =
417 bool DexFileLayoutFixedPointExec(std::string* error_msg) {
419 const std::string& tmp_name = tmp_file.GetFilename();
421 std::string tmp_dir = tmp_name.substr(0, tmp_last_slash + 1);
425 std::string dex_file = tmp_dir + "classes.dex";
427 std::vector<std::string> unzip_args = {
439 std::string profile_file = tmp_dir + "primary.prof";
441 std::string output_dex = tmp_dir + "classes.dex.new";
442 std::string second_output_dex = tmp_dir + "classes.dex.new.new";
445 std::vector<std::string> dexlayout_args =
457 std::vector<std::string> second_dexlayout_args =
464 std::vector<std::string> diff_exec_argv =
470 std::vector<std::string> test_files = { dex_file, profile_file, output_dex, second_output_dex };
481 bool UnreferencedCatchHandlerExec(std::string* error_msg, const char* filename) {
483 const std::string& tmp_name = tmp_file.GetFilename();
485 std::string tmp_dir = tmp_name.substr(0, tmp_last_slash + 1);
488 std::string input_dex = tmp_dir + "classes.dex";
490 std::string output_dex = tmp_dir + "classes.dex.new";
492 std::vector<std::string> dexlayout_args = { "-w", tmp_dir, "-o", "/dev/null", input_dex };
498 std::vector<std::string> diff_exec_argv = { "/usr/bin/diff", input_dex, output_dex };
503 std::vector<std::string> dex_files = { input_dex, output_dex };
515 const std::vector<std::string>& dexlayout_args) {
524 std::string error_msg;
533 bool DexLayoutExec(const std::vector<std::string>& dexlayout_args,
534 std::string* error_msg,
536 std::vector<std::string> argv;
538 std::string dexlayout = GetDexLayoutPath();
542 std::vector<std::string> cdex_level = DefaultCompactDexOption();
551 bool UnlinkFile(const std::string& file_path) {
560 std::string error_msg;
567 std::string error_msg;
574 std::string error_msg;
581 std::string error_msg;
588 std::string error_msg;
596 std::string error_msg;
604 std::string error_msg;
611 std::vector<std::string> dexlayout_args =
621 std::vector<std::string> dexlayout_args = { "-o", "/dev/null", temp_dex.GetFilename() };
631 std::vector<std::string> dexlayout_args =
642 std::vector<std::string> dexlayout_args =
653 std::vector<std::string> dexlayout_args =
663 std::vector<std::string> dexlayout_args = { "-o", "/dev/null", temp_dex.GetFilename() };
672 std::vector<std::string> dexlayout_args = { "-o", "/dev/null", temp_dex.GetFilename() };
724 std::string error_msg;
727 const std::string& tmp_name = tmp_file.GetFilename();
729 std::string tmp_dir = tmp_name.substr(0, tmp_last_slash + 1);
732 std::vector<std::string> dexlayout_args =
762 std::string error_msg;
765 const std::string& tmp_name = tmp_file.GetFilename();
767 std::string tmp_dir = tmp_name.substr(0, tmp_last_slash + 1);
770 std::vector<std::string> dexlayout_args =
788 std::string error_msg;
790 const std::string input_jar = GetTestDexFileName("ManyMethods");