Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 644e15d5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Reduce statsd binary size from 730KB-> 664KB"

parents 8e4419a0 20e9e623
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -70,7 +70,6 @@ statsd_common_src := \
    src/subscriber/IncidentdReporter.cpp \
    src/subscriber/SubscriberReporter.cpp \
    src/HashableDimensionKey.cpp \
    src/guardrail/MemoryLeakTrackUtil.cpp \
    src/guardrail/StatsdStats.cpp

statsd_common_c_includes := \
@@ -103,8 +102,7 @@ statsd_common_shared_libraries := \
    android.hardware.health@2.0 \
    android.hardware.power@1.0 \
    android.hardware.power@1.1 \
    android.hardware.thermal@1.0 \
    libmemunreachable
    android.hardware.thermal@1.0

# =========
# statsd
@@ -132,7 +130,7 @@ else
    LOCAL_CFLAGS += \
            -Os
endif
LOCAL_PROTOC_OPTIMIZE_TYPE := lite-static
LOCAL_PROTOC_OPTIMIZE_TYPE := lite

LOCAL_AIDL_INCLUDES := $(statsd_common_aidl_includes)
LOCAL_C_INCLUDES += $(statsd_common_c_includes)
+1 −4
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include "android-base/stringprintf.h"
#include "config/ConfigKey.h"
#include "config/ConfigManager.h"
#include "guardrail/MemoryLeakTrackUtil.h"
#include "guardrail/StatsdStats.h"
#include "storage/StorageManager.h"
#include "subscriber/SubscriberReporter.h"
@@ -638,9 +637,7 @@ status_t StatsService::cmd_remove_all_configs(FILE* out) {
}

status_t StatsService::cmd_dump_memory_info(FILE* out) {
    std::string s = dumpMemInfo(100);
    fprintf(out, "Memory Info\n");
    fprintf(out, "%s", s.c_str());
    fprintf(out, "meminfo not available.\n");
    return NO_ERROR;
}

+3 −7
Original line number Diff line number Diff line
@@ -16,14 +16,10 @@

#include "config/ConfigKey.h"

#include <sstream>

namespace android {
namespace os {
namespace statsd {

using std::ostringstream;

ConfigKey::ConfigKey() {
}

@@ -37,9 +33,9 @@ ConfigKey::~ConfigKey() {
}

string ConfigKey::ToString() const {
    ostringstream out;
    out << '(' << mUid << ',' << mId << ')';
    return out.str();
    string s;
    s += "(" + std::to_string(mUid) + " " + std::to_string(mId) + ")";
    return s;
}


+0 −7
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@

#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"

#include <functional>
#include <iostream>
#include <string>

namespace android {
@@ -27,7 +25,6 @@ namespace os {
namespace statsd {

using std::hash;
using std::ostream;
using std::string;

/**
@@ -68,10 +65,6 @@ private:
    int mUid;
};

inline ostream& operator<<(ostream& os, const ConfigKey& config) {
    return os << config.ToString();
}

int64_t StrToInt64(const string& str);

}  // namespace statsd
+194 −176

File changed.

Preview size limit exceeded, changes collapsed.

Loading