Lines Matching refs:fp
177 static bool WriteCallChain(FILE* fp, pid_t pid, pid_t tid, CallChainJoiner::ChainType type, in WriteCallChain() argument
199 if (fwrite(data.data(), size, 1, fp) != 1) { in WriteCallChain()
206 static bool ReadCallChain(FILE* fp, pid_t& pid, pid_t& tid, CallChainJoiner::ChainType& type, in ReadCallChain() argument
209 if (fread(data.data(), data.size(), 1, fp) != 1) { in ReadCallChain()
220 if (fread(data.data(), data.size(), 1, fp) != 1) { in ReadCallChain()
232 static bool ReadCallChainInReverseOrder(FILE* fp, pid_t& pid, pid_t& tid, in ReadCallChainInReverseOrder() argument
237 if (fseek(fp, -4, SEEK_CUR) != 0 || fread(&size, sizeof(size), 1, fp) != 1) { in ReadCallChainInReverseOrder()
242 if (fseek(fp, -static_cast<int>(size), SEEK_CUR) != 0 || in ReadCallChainInReverseOrder()
243 fread(data.data(), data.size(), 1, fp) != 1 || in ReadCallChainInReverseOrder()
244 fseek(fp, -static_cast<int>(data.size()), SEEK_CUR) != 0) { in ReadCallChainInReverseOrder()
263 FILE* fp = fdopen(tmpfile->release(), "web+"); in CreateTempFp() local
264 if (fp == nullptr) { in CreateTempFp()
268 return fp; in CreateTempFp()
398 FILE* fp; in GetNextCallChain() local
400 fp = (next_chain_index_ & 1) ? joined_chains_fp_ : original_chains_fp_; in GetNextCallChain()
403 fp = joined_chains_fp_; in GetNextCallChain()
406 return ReadCallChain(fp, pid, tid, type, ips, sps); in GetNextCallChain()