diff options
author | Dianne Hackborn <hackbod@google.com> | 2013-04-12 14:52:58 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2013-04-12 14:53:10 -0700 |
commit | f7be4800df28d7cb6a96003046bf90245e7054ab (patch) | |
tree | 398c298946d8f95fef56fe18a52903f68966be8e /libs | |
parent | 8d4c23b9c32f8c0328ebca538bb801716fe4478a (diff) | |
download | frameworks_base-f7be4800df28d7cb6a96003046bf90245e7054ab.zip frameworks_base-f7be4800df28d7cb6a96003046bf90245e7054ab.tar.gz frameworks_base-f7be4800df28d7cb6a96003046bf90245e7054ab.tar.bz2 |
Add new resources trace, also trace apk dex loading.
Change-Id: Ia48566efb21ee018659bd976ddb3a0f4997b9a3a
Diffstat (limited to 'libs')
-rw-r--r-- | libs/androidfw/AssetManager.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp index 8bd805c..e0d96c9 100644 --- a/libs/androidfw/AssetManager.cpp +++ b/libs/androidfw/AssetManager.cpp @@ -19,6 +19,7 @@ // #define LOG_TAG "asset" +#define ATRACE_TAG ATRACE_TAG_RESOURCES //#define LOG_NDEBUG 0 #include <androidfw/Asset.h> @@ -32,6 +33,7 @@ #include <utils/threads.h> #include <utils/Timers.h> #include <utils/ZipFileRO.h> +#include <cutils/trace.h> #include <assert.h> #include <dirent.h> @@ -51,6 +53,14 @@ _rc; }) #endif +#ifdef HAVE_ANDROID_OS +#define MY_TRACE_BEGIN(x) ATRACE_BEGIN(x) +#define MY_TRACE_END() ATRACE_END() +#else +#define MY_TRACE_BEGIN(x) +#define MY_TRACE_END() +#endif + using namespace android; /* @@ -638,6 +648,7 @@ const ResTable* AssetManager::getResTable(bool required) const ResTable* sharedRes = NULL; bool shared = true; const asset_path& ap = mAssetPaths.itemAt(i); + MY_TRACE_BEGIN(ap.path.string()); Asset* idmap = openIdmapLocked(ap); ALOGV("Looking for resource asset in '%s'\n", ap.path.string()); if (ap.type != kFileTypeDirectory) { @@ -702,6 +713,7 @@ const ResTable* AssetManager::getResTable(bool required) const if (idmap != NULL) { delete idmap; } + MY_TRACE_END(); } if (required && !rt) ALOGW("Unable to find resources file resources.arsc"); |