diff options
author | Jin Qian <jinqian@google.com> | 2017-02-06 14:02:50 -0800 |
---|---|---|
committer | Jin Qian <jinqian@google.com> | 2017-02-10 15:48:21 -0800 |
commit | 1275b1b6aaf417243ff3be17a400a21e26c42f39 (patch) | |
tree | 0a36a20c48e86c71a5a4393754cdea3493ea2a46 /storaged/include | |
parent | e5ea17c84024badac9498bd61d1c07f253d75cac (diff) | |
download | system_core-1275b1b6aaf417243ff3be17a400a21e26c42f39.tar.gz system_core-1275b1b6aaf417243ff3be17a400a21e26c42f39.tar.bz2 system_core-1275b1b6aaf417243ff3be17a400a21e26c42f39.zip |
storaged: add --force option to dumpsys
This option forces storaged to generate io usage report since last
report. This is for testing purpose so that we can run some app and
get the app's IO usage right away instead of waiting an hour for next
report.
Bug: 34198239
Bug: 34845096
Change-Id: I9cd217df37a9b6c8f383eb25d41602e8e8c8f9ba
Diffstat (limited to 'storaged/include')
-rw-r--r-- | storaged/include/storaged.h | 4 | ||||
-rw-r--r-- | storaged/include/storaged_uid_monitor.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/storaged/include/storaged.h b/storaged/include/storaged.h index a16be27db..0bdff7483 100644 --- a/storaged/include/storaged.h +++ b/storaged/include/storaged.h @@ -302,8 +302,8 @@ public: return mUidm.get_uid_io_stats(); } std::map<uint64_t, std::vector<struct uid_record>> get_uid_records( - int hours, uint64_t threshold) { - return mUidm.dump(hours, threshold); + int hours, uint64_t threshold, bool force_report) { + return mUidm.dump(hours, threshold, force_report); } void update_uid_io_interval(int interval) { if (interval >= DEFAULT_PERIODIC_CHORES_INTERVAL_UID_IO_LIMIT) { diff --git a/storaged/include/storaged_uid_monitor.h b/storaged/include/storaged_uid_monitor.h index ae850167d..f6250ae7b 100644 --- a/storaged/include/storaged_uid_monitor.h +++ b/storaged/include/storaged_uid_monitor.h @@ -91,10 +91,11 @@ public: // called by storaged -u std::unordered_map<uint32_t, struct uid_info> get_uid_io_stats(); // called by dumpsys - std::map<uint64_t, std::vector<struct uid_record>> dump(int hours, uint64_t threshold); + std::map<uint64_t, std::vector<struct uid_record>> dump( + int hours, uint64_t threshold, bool force_report); // called by battery properties listener void set_charger_state(charger_stat_t stat); - // called by storaged periodic_chore + // called by storaged periodic_chore or dump with force_report void report(); }; |