Home
last modified time | relevance | path

Searched refs:stat (Results 1 – 25 of 183) sorted by relevance

12345678

/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DMemoryStatUtilTest.java131 MemoryStat stat = parseMemoryStatFromMemcg(MEMORY_STAT_CONTENTS); in testParseMemoryStatFromMemcg_parsesCorrectValues() local
132 assertEquals(1, stat.pgfault); in testParseMemoryStatFromMemcg_parsesCorrectValues()
133 assertEquals(2, stat.pgmajfault); in testParseMemoryStatFromMemcg_parsesCorrectValues()
134 assertEquals(3, stat.rssInBytes); in testParseMemoryStatFromMemcg_parsesCorrectValues()
135 assertEquals(4, stat.cacheInBytes); in testParseMemoryStatFromMemcg_parsesCorrectValues()
136 assertEquals(5, stat.swapInBytes); in testParseMemoryStatFromMemcg_parsesCorrectValues()
141 MemoryStat stat = parseMemoryStatFromMemcg(""); in testParseMemoryStatFromMemcg_emptyMemoryStatContents() local
142 assertNull(stat); in testParseMemoryStatFromMemcg_emptyMemoryStatContents()
144 stat = parseMemoryStatFromMemcg(null); in testParseMemoryStatFromMemcg_emptyMemoryStatContents()
145 assertNull(stat); in testParseMemoryStatFromMemcg_emptyMemoryStatContents()
[all …]
/frameworks/native/libs/binder/ndk/tests/
Diface.cpp47 binder_status_t stat = STATUS_FAILED_TRANSACTION; in IFoo_Class_onTransact() local
56 stat = AParcel_readInt32(in, &valueIn); in IFoo_Class_onTransact()
57 if (stat != STATUS_OK) break; in IFoo_Class_onTransact()
58 stat = foo->doubleNumber(valueIn, &valueOut); in IFoo_Class_onTransact()
59 if (stat != STATUS_OK) break; in IFoo_Class_onTransact()
60 stat = AParcel_writeInt32(out, valueOut); in IFoo_Class_onTransact()
64 stat = foo->die(); in IFoo_Class_onTransact()
69 return stat; in IFoo_Class_onTransact()
81 binder_status_t stat = STATUS_OK; in doubleNumber() local
84 stat = AIBinder_prepareTransaction(mBinder, &parcelIn); in doubleNumber()
[all …]
/frameworks/base/services/core/java/com/android/server/storage/
DDiskStatsFileLogger.java127 PackageStats stat = entry.getValue(); in addAppsToJson() local
128 long appSize = stat.codeSize; in addAppsToJson()
129 long appDataSize = stat.dataSize; in addAppsToJson()
130 long cacheSize = stat.cacheSize; in addAppsToJson()
132 appSize += stat.externalCodeSize; in addAppsToJson()
133 appDataSize += stat.externalDataSize; in addAppsToJson()
134 cacheSize += stat.externalCacheSize; in addAppsToJson()
140 names.put(stat.packageName); in addAppsToJson()
161 for (PackageStats stat : mPackageStats) { in filterOnlyPrimaryUser()
162 if (stat.userHandle != UserHandle.USER_SYSTEM) { in filterOnlyPrimaryUser()
[all …]
/frameworks/base/services/core/java/com/android/server/power/batterysaver/
DBatterySavingStats.java240 Stat stat = mStats.get(stateIndex); in getStat() local
241 if (stat == null) { in getStat()
242 stat = new Stat(); in getStat()
243 mStats.put(stateIndex, stat); in getStat()
245 return stat; in getStat()
340 final Stat stat = getStat(mCurrentState);
342 stat.endBatteryLevel = batteryLevel;
343 stat.endBatteryPercent = batteryPercent;
344 stat.endTime = now;
346 final long deltaTime = stat.endTime - stat.startTime;
[all …]
/frameworks/av/media/mtp/
DMtpStorage.cpp63 struct statfs stat; in getMaxCapacity() local
64 if (statfs(getPath(), &stat)) in getMaxCapacity()
66 mMaxCapacity = (uint64_t)stat.f_blocks * (uint64_t)stat.f_bsize; in getMaxCapacity()
72 struct statfs stat; in getFreeSpace() local
73 if (statfs(getPath(), &stat)) in getFreeSpace()
75 return (uint64_t)stat.f_bavail * (uint64_t)stat.f_bsize; in getFreeSpace()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/
DRcsStats.java381 SipDelegateStats stat = new SipDelegateStats(); in getDefaultSipDelegateStat() local
382 stat.dimension = RANDOM.nextInt(); in getDefaultSipDelegateStat()
383 stat.carrierId = getCarrierId(subId); in getDefaultSipDelegateStat()
384 stat.slotId = getSlotId(subId); in getDefaultSipDelegateStat()
385 return stat; in getDefaultSipDelegateStat()
1497 LastSipDelegateStat stat = null; in getLastSipDelegateStat() local
1500 stat = lastStat; in getLastSipDelegateStat()
1505 if (stat == null) { in getLastSipDelegateStat()
1506 stat = new LastSipDelegateStat(subId, supportedTags); in getLastSipDelegateStat()
1507 mLastSipDelegateStatList.add(stat); in getLastSipDelegateStat()
[all …]
/frameworks/base/libs/hwui/service/
DGraphicsStatsService.cpp122 struct stat sb; in parseFromFile()
381 void mergeStat(const protos::GraphicsStatsProto& stat);
394 void GraphicsStatsService::Dump::mergeStat(const protos::GraphicsStatsProto& stat) { in mergeStat() argument
395 auto dumpKey = std::make_pair(stat.package_name(), stat.version_code()); in mergeStat()
398 mStats[dumpKey] = stat; in mergeStat()
401 summary->set_total_frames(summary->total_frames() + stat.summary().total_frames()); in mergeStat()
402 summary->set_janky_frames(summary->janky_frames() + stat.summary().janky_frames()); in mergeStat()
404 stat.summary().missed_vsync_count()); in mergeStat()
406 stat.summary().high_input_latency_count()); in mergeStat()
408 stat.summary().slow_ui_thread_count()); in mergeStat()
[all …]
/frameworks/base/cmds/incidentd/src/
Dreport_directory.cpp36 static bool stat_mtime_cmp(const std::pair<String8, struct stat>& a, in stat_mtime_cmp()
37 const std::pair<String8, struct stat>& b) { in stat_mtime_cmp()
44 struct stat st; in clean_directory()
46 std::vector<std::pair<String8, struct stat>> files; in clean_directory()
65 if (stat(filename.string(), &st) != 0) { in clean_directory()
72 files.push_back(std::pair<String8, struct stat>(filename, st)); in clean_directory()
89 for (std::vector<std::pair<String8, struct stat>>::iterator it = files.begin(); in clean_directory()
/frameworks/base/tests/LowStorageTest/src/com/android/lowstoragetest/
DLowStorageTest.java52 StatFs stat = new StatFs(path.getPath()); in onCreate() local
53 int totalBlocks = stat.getBlockCount(); in onCreate()
54 mBlockSize = (int) (stat.getBlockSize()); in onCreate()
80 StatFs stat = new StatFs(path.getPath()); in fillupdisk() local
81 int totalBlocks = stat.getBlockCount(); in fillupdisk()
82 int noOfBlockToFill = stat.getAvailableBlocks(); in fillupdisk()
122 StatFs stat = new StatFs(path.getPath()); in updateInfo() local
123 long availableBlocks = stat.getAvailableBlocks(); in updateInfo()
/frameworks/base/libs/androidfw/
Dmisc.cpp38 struct stat sb; in getFileType()
40 if (stat(fileName, &sb) < 0) { in getFileType()
77 struct stat sb; in getFileModDate()
79 if (stat(fileName, &sb) < 0) in getFileModDate()
DAssetsProvider.cpp103 struct stat sb{.st_mtime = -1}; in Create()
104 if (stat(path.c_str(), &sb) < 0) { in Create()
135 struct stat sb{.st_mtime = -1}; in Create()
280 struct stat sb{}; in IsUpToDate()
293 struct stat sb{}; in Create()
294 const int result = stat(path.c_str(), &sb); in Create()
318 struct stat sb{}; in OpenInternal()
319 *file_exists = (stat(resolved_path.c_str(), &sb) != -1) && S_ISREG(sb.st_mode); in OpenInternal()
341 struct stat sb{}; in IsUpToDate()
342 if (stat(dir_.c_str(), &sb) < 0) { in IsUpToDate()
/frameworks/base/tools/aapt/
DFileFinder.cpp24 struct stat fileStat; in isDirectory()
25 if (stat(filename, &fileStat) == -1) { in isDirectory()
34 struct stat fileStat; in isFile()
35 if (stat(filename, &fileStat) == -1) { in isFile()
80 void SystemFileFinder::checkAndAddFile(const String8& path, const struct stat* stats, in checkAndAddFile()
DDirectoryWalker.h33 virtual struct stat* entryStats() = 0;
43 struct stat mStats;
81 stat(fullPath.string(),&mStats); in nextEntry()
85 virtual struct stat* entryStats() { in entryStats()
DCacheUpdater.h64 struct stat s; in ensureDirectoriesExist()
69 if (stat(path.string(),&s) == -1) { in ensureDirectoriesExist()
77 } while (stat(existsPath.string(),&s) == -1); in ensureDirectoriesExist()
/frameworks/native/cmds/installd/tests/
Dinstalld_service_test.cpp140 struct stat buf; in stat_gid()
141 EXPECT_EQ(::stat(get_full_path(path).c_str(), &buf), 0); in stat_gid()
146 struct stat buf; in stat_mode()
147 EXPECT_EQ(::stat(get_full_path(path).c_str(), &buf), 0); in stat_mode()
469 struct stat s; in TEST_F()
473 if (stat(externalPicDir.c_str(), &s) == 0) { in TEST_F()
527 struct stat sb; in mkdirs()
528 if (stat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode)) { in mkdirs()
601 struct stat buf; in TEST_F()
603 ASSERT_EQ(0, stat((rollback_ce_dir + "/com.foo").c_str(), &buf)); in TEST_F()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/espresso/
DMouseClickAction.java47 Tapper.Status stat = sendSingleTap(uiController, coordinates, precision, in sendTap() local
50 if (stat == Tapper.Status.FAILURE) { in sendTap()
52 } else if (stat == Tapper.Status.WARNING) { in sendTap()
61 stat = sendSingleTap(uiController, coordinates, precision, inputDevice, in sendTap()
63 if (stat == Tapper.Status.FAILURE) { in sendTap()
65 } else if (stat == Tapper.Status.WARNING) { in sendTap()
/frameworks/base/core/jni/
Dfd_utils.cpp186 const struct stat stat; member in FileDescriptorInfo
199 FileDescriptorInfo(struct stat stat, const std::string& file_path, int fd, int open_flags,
217 struct stat f_stat; in CreateFromFd()
322 struct stat f_stat; in RefersToSameFile()
328 return f_stat.st_ino == stat.st_ino && f_stat.st_dev == stat.st_dev; in RefersToSameFile()
395 stat(), in FileDescriptorInfo()
403 FileDescriptorInfo::FileDescriptorInfo(struct stat stat, const std::string& file_path, in FileDescriptorInfo() argument
407 stat(stat), in FileDescriptorInfo()
/frameworks/base/core/java/android/app/
DSharedPreferencesImpl.java162 StructStat stat = null; in loadFromDisk() local
165 stat = Os.stat(mFile.getPath()); in loadFromDisk()
196 mStatTimestamp = stat.st_mtim; in loadFromDisk()
197 mStatSize = stat.st_size; in loadFromDisk()
238 final StructStat stat; in hasFileChangedUnexpectedly() local
245 stat = Os.stat(mFile.getPath()); in hasFileChangedUnexpectedly()
251 return !stat.st_mtim.equals(mStatTimestamp) || mStatSize != stat.st_size; in hasFileChangedUnexpectedly()
819 final StructStat stat = Os.stat(mFile.getPath()); in writeToFile() local
821 mStatTimestamp = stat.st_mtim; in writeToFile()
822 mStatSize = stat.st_size; in writeToFile()
/frameworks/native/libs/vr/libpdx_default_transport/
Dpdx_tool.cpp98 typedef int (*CallbackType)(const char* path, const struct stat* sb,
101 int ReloadCommandCallback(const char* path, const struct stat* sb,
103 int DumpCommandCallback(const char* path, const struct stat* sb, int type_flag,
158 int ReloadCommandCallback(const char* path, const struct stat*, int type_flag, in ReloadCommandCallback() argument
165 int DumpCommandCallback(const char* path, const struct stat*, int type_flag, in DumpCommandCallback() argument
/frameworks/native/libs/gui/
DBLASTBufferQueue.cpp257 for (auto stat : stats) { in findMatchingStat() local
258 if (SurfaceControl::isSameSurface(sc, stat.surfaceControl)) { in findMatchingStat()
259 return stat; in findMatchingStat()
284 std::optional<SurfaceControlStats> stat = findMatchingStat(stats, pendingSC); in transactionCommittedCallback() local
285 if (stat) { in transactionCommittedCallback()
286 uint64_t currFrameNumber = stat->frameEventStats.frameNumber; in transactionCommittedCallback()
336 SurfaceControlStats stat = *statsOptional; in transactionCallback() local
337 mTransformHint = stat.transformHint; in transactionCallback()
342 if (stat.latchTime > 0) { in transactionCallback()
344 ->updateFrameTimestamps(stat.frameEventStats.frameNumber, in transactionCallback()
[all …]
/frameworks/base/services/voiceinteraction/java/com/android/server/soundtrigger/
DSoundTriggerService.java138 SoundModelStat stat = mModelStats.get(id); in onStart() local
139 if (stat == null) { in onStart()
140 stat = new SoundModelStat(); in onStart()
141 mModelStats.put(id, stat); in onStart()
144 if (stat.mIsStarted) { in onStart()
149 stat.mStartCount++; in onStart()
150 stat.mLastStartTimestampMsec = SystemClock.elapsedRealtime(); in onStart()
151 stat.mIsStarted = true; in onStart()
155 SoundModelStat stat = mModelStats.get(id); in onStop() local
156 if (stat == null) { in onStop()
[all …]
/frameworks/base/core/java/com/android/internal/os/
DBinderCallsStats.java474 for (CallStat stat : entry.getCallStatsList()) { in getExportedCallStats()
475 ExportedCallStat e = getExportedCallStat(entry.workSourceUid, stat); in getExportedCallStats()
516 for (CallStat stat : entry.getCallStatsList()) { in getExportedCallStats()
517 ExportedCallStat e = getExportedCallStat(workSourceUid, stat); in getExportedCallStats()
530 private ExportedCallStat getExportedCallStat(int workSourceUid, CallStat stat) { in getExportedCallStat() argument
533 exported.callingUid = stat.callingUid; in getExportedCallStat()
534 exported.className = stat.binderClass.getName(); in getExportedCallStat()
535 exported.binderClass = stat.binderClass; in getExportedCallStat()
536 exported.transactionCode = stat.transactionCode; in getExportedCallStat()
537 exported.screenInteractive = stat.screenInteractive; in getExportedCallStat()
[all …]
/frameworks/native/libs/diskusage/
Ddirsize.c25 int64_t stat_size(struct stat *s) in stat_size()
33 struct stat s; in calculate_dir_size()
/frameworks/base/packages/EncryptedLocalTransport/src/com/android/encryptedlocaltransport/
DEncryptedLocalTransport.java55 StructStat stat = Os.fstat(data.getFileDescriptor()); in performBackup() local
56 if (stat.st_size > KEY_VALUE_BACKUP_SIZE_QUOTA) { in performBackup()
57 Log.w(TAG, "New datastore size " + stat.st_size in performBackup()
/frameworks/compile/libbcc/bcinfo/Wrap/
Dfile_wrapper_input.cpp49 struct stat st; in Size()
50 if (stat(_name, &st) == 0) { in Size()

12345678