Storaged cleanup
Compliance with Android Coding standards Test: compile Bug: 28826771 Change-Id: I10bc4a793bb1da75e8600b81a5d7ff913e310da1
This commit is contained in:
parent
2131e59cc8
commit
af49d9756f
5 changed files with 15 additions and 20 deletions
|
@ -36,4 +36,4 @@
|
|||
|
||||
2732 storaged_disk_stats (type|3),(start_time|2|3),(end_time|2|3),(read_ios|2|1),(read_merges|2|1),(read_sectors|2|1),(read_ticks|2|3),(write_ios|2|1),(write_merges|2|1),(write_sectors|2|1),(write_ticks|2|3),(o_in_flight|2|1),(io_ticks|2|3),(io_in_queue|2|1)
|
||||
|
||||
2733 storaged_emmc_info (mmc_ver|3),(eol|1),(lifetime_a|1),(lifetime_b|1)
|
||||
2733 storaged_emmc_info (mmc_ver|3),(eol|1),(lifetime_a|1),(lifetime_b|1)
|
||||
|
|
|
@ -290,9 +290,8 @@ int main(int argc, char** argv) {
|
|||
sort_running_tasks_info(res);
|
||||
log_console_running_tasks_info(res);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
#include <android-base/logging.h>
|
||||
|
||||
#include <storaged.h>
|
||||
|
@ -42,12 +41,12 @@ void disk_stats_publisher::update(void) {
|
|||
if (parse_disk_stats(DISK_STATS_PATH, &curr)) {
|
||||
struct disk_stats inc = get_inc_disk_stats(&mPrevious, &curr);
|
||||
add_disk_stats(&inc, &mAccumulate);
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG
|
||||
// log_kernel_disk_stats(&mPrevious, "prev stats");
|
||||
// log_kernel_disk_stats(&curr, "curr stats");
|
||||
// log_kernel_disk_stats(&inc, "inc stats");
|
||||
// log_kernel_disk_stats(&mAccumulate, "accumulated stats");
|
||||
#endif
|
||||
#endif
|
||||
mPrevious = curr;
|
||||
}
|
||||
}
|
||||
|
@ -103,10 +102,10 @@ void disk_stats_monitor::update(struct disk_stats* stats) {
|
|||
if (UNLIKELY(detect(&perf))) {
|
||||
mStall = true;
|
||||
add_disk_stats(&inc, &mAccumulate);
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG
|
||||
log_kernel_disk_perf(&mMean, "stalled_mean");
|
||||
log_kernel_disk_perf(&mStd, "stalled_std");
|
||||
#endif
|
||||
#endif
|
||||
} else {
|
||||
if (mStall) {
|
||||
log_kernel_disk_stats(&mAccumulate, "stalled");
|
||||
|
@ -208,4 +207,4 @@ void storaged_t::event(void) {
|
|||
}
|
||||
|
||||
mTimer += mConfig.periodic_chores_interval_unit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,15 +16,15 @@
|
|||
|
||||
#define LOG_TAG "storaged"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <linux/time.h>
|
||||
|
||||
#include <dirent.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/time.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sstream>
|
||||
|
@ -32,18 +32,16 @@
|
|||
#include <unordered_map>
|
||||
|
||||
#include <android-base/file.h>
|
||||
#include <android-base/logging.h>
|
||||
#include <android-base/stringprintf.h>
|
||||
#include <android-base/strings.h>
|
||||
#include <android-base/logging.h>
|
||||
#include <cutils/klog.h>
|
||||
#include <log/log.h>
|
||||
#include <log/log_event_list.h>
|
||||
#include <cutils/klog.h>
|
||||
|
||||
#include <storaged.h>
|
||||
#include <storaged_utils.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define SECTOR_SIZE ( 512 )
|
||||
#define SEC_TO_MSEC ( 1000 )
|
||||
#define MSEC_TO_USEC ( 1000 )
|
||||
|
@ -416,7 +414,7 @@ void tasks_t::update_running_tasks(void) {
|
|||
}
|
||||
}
|
||||
}
|
||||
{ // update critical area
|
||||
{ // update critical area
|
||||
// this is really fast!
|
||||
std::unique_ptr<lock_t> lock(new lock_t(&mSem));
|
||||
mRunning = tasks_latest;
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
//#include <private/android_logger.h>
|
||||
|
||||
#include <storaged.h> // data structures
|
||||
#include <storaged_utils.h> // functions to test
|
||||
|
|
Loading…
Reference in a new issue