/system/extras/simpleperf/ |
H A D | record_file_writer.cpp | 36 std::unique_ptr<RecordFileWriter> RecordFileWriter::CreateInstance(const std::string& filename) { argument 39 if (!android::base::RemoveFileIfExists(filename, &err)) { 40 LOG(ERROR) << "failed to remove file " << filename << ": " << err; 43 FILE* fp = fopen(filename.c_str(), "web+"); 45 PLOG(ERROR) << "failed to open record file '" << filename << "'"; 49 return std::unique_ptr<RecordFileWriter>(new RecordFileWriter(filename, fp)); 52 RecordFileWriter::RecordFileWriter(const std::string& filename, FILE* fp) argument 53 : filename_(filename),
|
H A D | utils.cpp | 59 FileHelper FileHelper::OpenReadOnly(const std::string& filename) { argument 60 int fd = TEMP_FAILURE_RETRY(open(filename.c_str(), O_RDONLY | O_BINARY)); 64 FileHelper FileHelper::OpenWriteOnly(const std::string& filename) { argument 65 int fd = TEMP_FAILURE_RETRY(open(filename.c_str(), O_WRONLY | O_BINARY | O_CREAT, 0644)); 143 bool IsRegularFile(const std::string& filename) { argument 145 if (stat(filename.c_str(), &st) == 0) { 153 uint64_t GetFileSize(const std::string& filename) { argument 155 if (stat(filename.c_str(), &st) == 0) {
|
H A D | record.cpp | 192 filename = p; 193 p += ALIGN(filename.size() + 1, 8); 203 strcpy(p, filename.c_str()); 204 p += ALIGN(filename.size() + 1, 8); 210 header.size = sizeof(header) + sizeof(data) + ALIGN(filename.size() + 1, 8) + sample_id.Size(); 216 PrintIndented(indent, "pgoff 0x%" PRIx64 ", filename %s\n", data.pgoff, filename.c_str()); 224 filename = p; 225 p += ALIGN(filename.size() + 1, 8); 235 strcpy(p, filename 631 CreateMmapRecord(const perf_event_attr& attr, bool in_kernel, uint32_t pid, uint32_t tid, uint64_t addr, uint64_t len, uint64_t pgoff, const std::string& filename) argument 678 CreateBuildIdRecord(bool in_kernel, pid_t pid, const BuildId& build_id, const std::string& filename) argument [all...] |
H A D | thread_tree.h | 71 const std::string& filename); 73 uint64_t time, const std::string& filename); 83 Dso* FindKernelDsoOrNew(const std::string& filename); 84 Dso* FindUserDsoOrNew(const std::string& filename);
|
H A D | cpu_hotplug_test.cpp | 96 std::string filename = android::base::StringPrintf("/sys/devices/system/cpu/cpu%d/online", cpu); local 98 CHECK(android::base::ReadFileToString(filename, &content)) << "failed to read file " << filename; 106 std::string filename = android::base::StringPrintf("/sys/devices/system/cpu/cpu%d/online", cpu); local 108 CHECK(android::base::WriteStringToFile(content, filename)) << "Write " << content << " to " 109 << filename << " failed"; local
|
/system/security/keystore/ |
H A D | blob.cpp | 90 ResponseCode Blob::writeBlob(const char* filename, AES_KEY* aes_key, State state, argument 92 ALOGV("writing blob %s", filename); 100 ALOGW("Could not read random data for: %s", filename); 146 if (rename(tmpFileName, filename) == -1) { 147 ALOGW("could not rename blob to %s: %s", filename, strerror(errno)); 153 ResponseCode Blob::readBlob(const char* filename, AES_KEY* aes_key, State state) { argument 154 ALOGV("reading blob %s", filename); 155 int in = TEMP_FAILURE_RETRY(open(filename, O_RDONLY));
|
H A D | blob.h | 105 ResponseCode writeBlob(const char* filename, AES_KEY* aes_key, State state, Entropy* entropy); 106 ResponseCode readBlob(const char* filename, AES_KEY* aes_key, State state);
|
/system/tools/aidl/ |
H A D | generate_java.cpp | 57 int generate_java(const string& filename, const string& originalSrc, argument 68 CodeWriterPtr code_writer = io_delegate.GetCodeWriter(filename);
|
H A D | aidl.h | 66 const std::string& filename, TypeNamespace* types);
|
H A D | generate_java.h | 33 int generate_java(const std::string& filename, const std::string& originalSrc,
|
H A D | io_delegate.h | 43 // Returns a unique_ptr to the contents of |filename|. 46 const std::string& filename,
|
/system/extras/tests/sdcard/ |
H A D | sdcard_perf_test.cpp | 292 char filename[80] = {'\0',}; local 294 sprintf(filename, "%s/file-%d-%d", kTestDir, idx, getpid()); 297 int fd = open(filename, O_RDONLY); 373 char filename[80] = {'\0',}; local 375 sprintf(filename, "%s/file-%d-%d", kTestDir, i, testCase->pid()); 376 int fd = open(filename, O_RDWR | O_CREAT, S_IRWXU); 419 char filename[80] = {'\0',}; local 421 sprintf(filename, "%s/file-%d-%d", kTestDir, idx, getpid()); 423 int fd = open(filename, O_RDWR | O_CREAT, S_IRWXU); // no O_TRUNC, see header comment 533 char filename[8 local 559 writeTestFile(TestCase *testCase, const char* filename) argument [all...] |
/system/extras/cpustats/ |
H A D | cpustats.c | 57 static int get_cpu_count_from_file(char *filename); 185 * Get the number of CPUs from a given filename. 187 static int get_cpu_count_from_file(char *filename) { argument 192 file = fopen(filename, "r"); 193 if (!file) die("Could not open %s\n", filename); 194 if (!fgets(line, MAX_BUF_SIZE, file)) die("Could not get %s contents\n", filename); 205 die("Unexpected input in file %s (%s).\n", filename, line); 214 char filename[MAX_BUF_SIZE]; local 218 sprintf(filename, "/sys/devices/system/cpu/cpu%d/cpufreq/stats/time_in_state", cpu); 219 file = fopen(filename, " 265 char filename[MAX_BUF_SIZE]; local [all...] |
/system/core/init/ |
H A D | bootchart.cpp | 125 char filename[32]; local 129 snprintf(filename, sizeof(filename), "/proc/%d/cmdline", pid); 131 android::base::ReadFileToString(filename, &cmdline); 135 snprintf(filename, sizeof(filename), "/proc/%d/stat", pid); 137 if (android::base::ReadFileToString(filename, &stat)) {
|
H A D | action.h | 32 const std::string& filename, int line); 50 const std::string& filename, int line, std::string* err); 53 const std::string& filename = "", int line = 0); 124 const std::string& filename, int line,
|
H A D | init_parser.cpp | 43 void Parser::ParseData(const std::string& filename, const std::string& data) { argument 49 state.filename = filename.c_str(); 81 if (!section_parser->ParseLineSection(args, state.filename,
|
/system/extras/ext4_utils/ |
H A D | extent.c | 56 u64 backing_len, const char *filename) 67 sparse_file_add_file(ext4_sparse_file, filename, offset, len, 226 const char *filename) 229 // TODO(mkayyash): base_fs_allocations is sorted by filename, consider 230 // storing it in an array and then binary searching for a filename match instead 231 while (prealloc && prealloc->filename != NULL) { 232 if (!strcmp(filename, prealloc->filename)) { 253 extent_create_backing_file(alloc, len, filename); 55 extent_create_backing_file(struct block_allocation *alloc, u64 backing_len, const char *filename) argument 225 inode_allocate_file_extents(struct ext4_inode *inode, u64 len, const char *filename) argument
|
H A D | ext2simg.c | 56 static int build_sparse_ext(int fd, const char *filename) argument 69 sparse_file_add_file(ext4_sparse_file, filename, 0, 94 sparse_file_add_file(ext4_sparse_file, filename, 108 sparse_file_add_file(ext4_sparse_file, filename,
|
H A D | make_ext4fs_main.c | 61 fprintf(stderr, " <filename> [[<directory>] <target_out_directory>]\n"); 67 const char *filename = NULL; local 227 fprintf(stderr, "Expected filename after options\n"); 232 filename = argv[optind++]; 246 if (strcmp(filename, "-")) { 247 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644); 266 if (exitcode && strcmp(filename, "-")) 267 unlink(filename);
|
/system/extras/libpagemap/ |
H A D | pm_process.c | 35 char filename[MAX_FILENAME]; local 48 error = snprintf(filename, MAX_FILENAME, "/proc/%d/pagemap", pid); 55 proc->pagemap_fd = open(filename, O_RDONLY); 182 char filename[MAX_FILENAME]; local 208 error = snprintf(filename, MAX_FILENAME, "/proc/%d/clear_refs", 214 fd = open(filename, O_WRONLY); 246 char filename[MAX_FILENAME]; local 263 error = snprintf(filename, MAX_FILENAME, "/proc/%d/maps", proc->pid); 269 maps_f = fopen(filename, "r");
|
/system/tools/aidl/tests/ |
H A D | fake_io_delegate.cpp | 45 string filename = CleanPath(relative_filename); local 47 auto it = file_contents_.find(filename); 93 void FakeIoDelegate::SetFileContents(const string& filename, argument 95 file_contents_[filename] = contents;
|
H A D | fake_io_delegate.h | 41 const std::string& filename, 54 void SetFileContents(const std::string& filename,
|
/system/update_engine/payload_generator/ |
H A D | fake_filesystem.h | 46 void AddFile(const std::string& filename, const std::vector<Extent> extents);
|
H A D | mapfile_filesystem.cc | 44 const string& filename, const string& mapfile_filename) { 45 if (filename.empty() || mapfile_filename.empty()) 48 off_t file_size = utils::FileSize(filename); 53 LOG(ERROR) << "Image file " << filename << " has a size of " << file_size 43 CreateFromFile( const string& filename, const string& mapfile_filename) argument
|
/system/core/libsparse/ |
H A D | backed_block.c | 35 char *filename; member in struct:backed_block::__anon1683::__anon1685 84 return bb->file.filename; 117 free(bb->file.filename); 225 if (strcmp(a->file.filename, b->file.filename) || 328 int backed_block_add_file(struct backed_block_list *bbl, const char *filename, argument 339 bb->file.filename = strdup(filename);
|