OSDN Git Service

system/extras: Replace cutils/log.h with android/log.h or log/log.h am: 3d66aa307e...
[android-x86/system-extras.git] / memtrack / memtrack.cpp
index a451d5c..f14e06d 100644 (file)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#define LOG_TAG "MemTracker"
 
 #include "memtrack.h"
 
 #include <sys/types.h>
 #include <unistd.h>
 
-#include <cutils/log.h>
-
 #include <algorithm>
 #include <vector>
 
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "MemTracker"
+#include <android/log.h>
 
 FileData::FileData(char *filename, char *buffer, size_t buffer_len)
     : data_(buffer), max_(buffer_len), cur_idx_(0), len_(0),
@@ -248,7 +244,7 @@ void ProcessInfo::dumpToLog() {
   for (std::vector<const process_info_t *>::const_iterator it = list_.begin();
        it != list_.end(); ++it) {
     ALOGI("  Name: %s", (*it)->name.c_str());
-    ALOGI("    Max running processes: %d", (*it)->max_num_pids);
+    ALOGI("    Max running processes: %zu", (*it)->max_num_pids);
     if ((*it)->pids.size() > 0) {
       ALOGI("    Currently running pids:");
       for (std::vector<int>::const_iterator pid_it = (*it)->pids.begin();