Commit 5541a6c8 by Ian Elliott Committed by Commit Bot

Change A4A opt-in/out log messages from DEBUG to VERBOSE.

DEBUG was useful for developing and turning on the code, but it's too verbose to be used with the Android Q release. Bug: angleproject:2794 Change-Id: I092567c25414cbba7f36ab94e191b1dcfe39fbcb Reviewed-on: https://chromium-review.googlesource.com/c/1260102 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
parent 1395134c
...@@ -165,7 +165,7 @@ class ListOf ...@@ -165,7 +165,7 @@ class ListOf
} }
bool match(T &toCheck) bool match(T &toCheck)
{ {
ALOGD("\t\t Within ListOf<%s> match: wildcards are %s and %s,\n", mListType.c_str(), ALOGV("\t\t Within ListOf<%s> match: wildcards are %s and %s,\n", mListType.c_str(),
mWildcard ? "true" : "false", toCheck.mWildcard ? "true" : "false"); mWildcard ? "true" : "false", toCheck.mWildcard ? "true" : "false");
if (mWildcard || toCheck.mWildcard) if (mWildcard || toCheck.mWildcard)
{ {
...@@ -173,7 +173,7 @@ class ListOf ...@@ -173,7 +173,7 @@ class ListOf
} }
for (auto &it : mList) for (auto &it : mList)
{ {
ALOGD("\t\t Within ListOf<%s> match: calling match on sub-item is %s,\n", ALOGV("\t\t Within ListOf<%s> match: calling match on sub-item is %s,\n",
mListType.c_str(), it.match(toCheck) ? "true" : "false"); mListType.c_str(), it.match(toCheck) ? "true" : "false");
if (it.match(toCheck)) if (it.match(toCheck))
{ {
...@@ -187,12 +187,12 @@ class ListOf ...@@ -187,12 +187,12 @@ class ListOf
{ {
if (mWildcard) if (mWildcard)
{ {
ALOGD("%sListOf%s is wildcarded to always match", prefix.c_str(), name.c_str()); ALOGV("%sListOf%s is wildcarded to always match", prefix.c_str(), name.c_str());
} }
else else
{ {
int nItems = mList.size(); int nItems = mList.size();
ALOGD("%sListOf%s is has %d item(s):", prefix.c_str(), name.c_str(), nItems); ALOGV("%sListOf%s is has %d item(s):", prefix.c_str(), name.c_str(), nItems);
for (auto &it : mList) for (auto &it : mList)
{ {
it.logItem(); it.logItem();
...@@ -237,13 +237,13 @@ class Version ...@@ -237,13 +237,13 @@ class Version
~Version() {} ~Version() {}
bool match(Version &toCheck) bool match(Version &toCheck)
{ {
ALOGD("\t\t\t Within Version %d,%d,%d,%d match(%d,%d,%d,%d): wildcards are %s and %s,\n", ALOGV("\t\t\t Within Version %d,%d,%d,%d match(%d,%d,%d,%d): wildcards are %s and %s,\n",
mMajor.mPart, mMinor.mPart, mSubminor.mPart, mPatch.mPart, toCheck.mMajor.mPart, mMajor.mPart, mMinor.mPart, mSubminor.mPart, mPatch.mPart, toCheck.mMajor.mPart,
toCheck.mMinor.mPart, toCheck.mSubminor.mPart, toCheck.mPatch.mPart, toCheck.mMinor.mPart, toCheck.mSubminor.mPart, toCheck.mPatch.mPart,
mWildcard ? "true" : "false", toCheck.mWildcard ? "true" : "false"); mWildcard ? "true" : "false", toCheck.mWildcard ? "true" : "false");
if (!(mWildcard || toCheck.mWildcard)) if (!(mWildcard || toCheck.mWildcard))
{ {
ALOGD("\t\t\t mMajor match is %s, mMinor is %s, mSubminor is %s, mPatch is %s\n", ALOGV("\t\t\t mMajor match is %s, mMinor is %s, mSubminor is %s, mPatch is %s\n",
mMajor.match(toCheck.mMajor) ? "true" : "false", mMajor.match(toCheck.mMajor) ? "true" : "false",
mMinor.match(toCheck.mMinor) ? "true" : "false", mMinor.match(toCheck.mMinor) ? "true" : "false",
mSubminor.match(toCheck.mSubminor) ? "true" : "false", mSubminor.match(toCheck.mSubminor) ? "true" : "false",
...@@ -404,29 +404,29 @@ class Application ...@@ -404,29 +404,29 @@ class Application
{ {
if (mWildcard) if (mWildcard)
{ {
ALOGD(" Wildcard (i.e. will match all applications)"); ALOGV(" Wildcard (i.e. will match all applications)");
} }
else if (!mVersion.mWildcard) else if (!mVersion.mWildcard)
{ {
if (!mIntent.mWildcard) if (!mIntent.mWildcard)
{ {
ALOGD(" Application \"%s\" (version: %s; intent: \"%s\")", mName.mPart.c_str(), ALOGV(" Application \"%s\" (version: %s; intent: \"%s\")", mName.mPart.c_str(),
mVersion.getString().c_str(), mIntent.mPart.c_str()); mVersion.getString().c_str(), mIntent.mPart.c_str());
} }
else else
{ {
ALOGD(" Application \"%s\" (version: %s)", mName.mPart.c_str(), ALOGV(" Application \"%s\" (version: %s)", mName.mPart.c_str(),
mVersion.getString().c_str()); mVersion.getString().c_str());
} }
} }
else if (!mIntent.mWildcard) else if (!mIntent.mWildcard)
{ {
ALOGD(" Application \"%s\" (intent: \"%s\")", mName.mPart.c_str(), ALOGV(" Application \"%s\" (intent: \"%s\")", mName.mPart.c_str(),
mIntent.mPart.c_str()); mIntent.mPart.c_str());
} }
else else
{ {
ALOGD(" Application \"%s\"", mName.mPart.c_str()); ALOGV(" Application \"%s\"", mName.mPart.c_str());
} }
} }
...@@ -463,13 +463,13 @@ class GPU ...@@ -463,13 +463,13 @@ class GPU
GPU() : mVendor(), mDeviceId(), mVersion(), mWildcard(true) {} GPU() : mVendor(), mDeviceId(), mVersion(), mWildcard(true) {}
bool match(GPU &toCheck) bool match(GPU &toCheck)
{ {
ALOGD("\t\t Within GPU match: wildcards are %s and %s,\n", mWildcard ? "true" : "false", ALOGV("\t\t Within GPU match: wildcards are %s and %s,\n", mWildcard ? "true" : "false",
toCheck.mWildcard ? "true" : "false"); toCheck.mWildcard ? "true" : "false");
ALOGD("\t\t mVendor = \"%s\" and toCheck.mVendor = \"%s\"\n", mVendor.mPart.c_str(), ALOGV("\t\t mVendor = \"%s\" and toCheck.mVendor = \"%s\"\n", mVendor.mPart.c_str(),
toCheck.mVendor.mPart.c_str()); toCheck.mVendor.mPart.c_str());
ALOGD("\t\t mDeviceId = %d and toCheck.mDeviceId = %d\n", mDeviceId.mPart, ALOGV("\t\t mDeviceId = %d and toCheck.mDeviceId = %d\n", mDeviceId.mPart,
toCheck.mDeviceId.mPart); toCheck.mDeviceId.mPart);
ALOGD("\t\t mVendor match is %s, mDeviceId is %s, mVersion is %s\n", ALOGV("\t\t mVendor match is %s, mDeviceId is %s, mVersion is %s\n",
toCheck.mVendor.match(mVendor) ? "true" : "false", toCheck.mVendor.match(mVendor) ? "true" : "false",
toCheck.mDeviceId.match(mDeviceId) ? "true" : "false", toCheck.mDeviceId.match(mDeviceId) ? "true" : "false",
toCheck.mVersion.match(mVersion) ? "true" : "false"); toCheck.mVersion.match(mVersion) ? "true" : "false");
...@@ -507,7 +507,7 @@ class GPU ...@@ -507,7 +507,7 @@ class GPU
} }
else else
{ {
ALOGD("Asked to parse a GPU, but no GPU found"); ALOGW("Asked to parse a GPU, but no GPU found");
} }
// TODO (ianelliott@) (b/113346561) appropriately destruct lists and // TODO (ianelliott@) (b/113346561) appropriately destruct lists and
...@@ -518,7 +518,7 @@ class GPU ...@@ -518,7 +518,7 @@ class GPU
{ {
if (mWildcard) if (mWildcard)
{ {
ALOGD(" Wildcard (i.e. will match all GPUs)"); ALOGV(" Wildcard (i.e. will match all GPUs)");
} }
else else
{ {
...@@ -526,18 +526,18 @@ class GPU ...@@ -526,18 +526,18 @@ class GPU
{ {
if (!mVersion.mWildcard) if (!mVersion.mWildcard)
{ {
ALOGD("\t GPU vendor: %s, deviceId: 0x%x, version: %s", ALOGV("\t GPU vendor: %s, deviceId: 0x%x, version: %s",
mVendor.mPart.c_str(), mDeviceId.mPart, mVersion.getString().c_str()); mVendor.mPart.c_str(), mDeviceId.mPart, mVersion.getString().c_str());
} }
else else
{ {
ALOGD("\t GPU vendor: %s, deviceId: 0x%x", mVendor.mPart.c_str(), ALOGV("\t GPU vendor: %s, deviceId: 0x%x", mVendor.mPart.c_str(),
mDeviceId.mPart); mDeviceId.mPart);
} }
} }
else else
{ {
ALOGD("\t GPU vendor: %s", mVendor.mPart.c_str()); ALOGV("\t GPU vendor: %s", mVendor.mPart.c_str());
} }
} }
} }
...@@ -569,15 +569,15 @@ class Device ...@@ -569,15 +569,15 @@ class Device
void addGPU(GPU &gpu) { mGpuList.addItem(gpu); } void addGPU(GPU &gpu) { mGpuList.addItem(gpu); }
bool match(Device &toCheck) bool match(Device &toCheck)
{ {
ALOGD("\t Within Device match: wildcards are %s and %s,\n", mWildcard ? "true" : "false", ALOGV("\t Within Device match: wildcards are %s and %s,\n", mWildcard ? "true" : "false",
toCheck.mWildcard ? "true" : "false"); toCheck.mWildcard ? "true" : "false");
if (!(mWildcard || toCheck.mWildcard)) if (!(mWildcard || toCheck.mWildcard))
{ {
ALOGD("\t Manufacturer match is %s, model is %s\n", ALOGV("\t Manufacturer match is %s, model is %s\n",
toCheck.mManufacturer.match(mManufacturer) ? "true" : "false", toCheck.mManufacturer.match(mManufacturer) ? "true" : "false",
toCheck.mModel.match(mModel) ? "true" : "false"); toCheck.mModel.match(mModel) ? "true" : "false");
} }
ALOGD("\t Need to check ListOf<GPU>\n"); ALOGV("\t Need to check ListOf<GPU>\n");
return ((mWildcard || toCheck.mWildcard || return ((mWildcard || toCheck.mWildcard ||
// The wildcards can override the Manufacturer/Model check, but not the GPU check // The wildcards can override the Manufacturer/Model check, but not the GPU check
(toCheck.mManufacturer.match(mManufacturer) && toCheck.mModel.match(mModel))) && (toCheck.mManufacturer.match(mManufacturer) && toCheck.mModel.match(mModel))) &&
...@@ -618,12 +618,12 @@ class Device ...@@ -618,12 +618,12 @@ class Device
{ {
if (mGpuList.mWildcard) if (mGpuList.mWildcard)
{ {
ALOGD(" Wildcard (i.e. will match all devices)"); ALOGV(" Wildcard (i.e. will match all devices)");
return; return;
} }
else else
{ {
ALOGD( ALOGV(
" Device with any manufacturer and model" " Device with any manufacturer and model"
", and with the following GPUs:"); ", and with the following GPUs:");
} }
...@@ -632,14 +632,14 @@ class Device ...@@ -632,14 +632,14 @@ class Device
{ {
if (!mModel.mWildcard) if (!mModel.mWildcard)
{ {
ALOGD( ALOGV(
" Device manufacturer: \"%s\" and model \"%s\"" " Device manufacturer: \"%s\" and model \"%s\""
", and with the following GPUs:", ", and with the following GPUs:",
mManufacturer.mPart.c_str(), mModel.mPart.c_str()); mManufacturer.mPart.c_str(), mModel.mPart.c_str());
} }
else else
{ {
ALOGD( ALOGV(
" Device manufacturer: \"%s\"" " Device manufacturer: \"%s\""
", and with the following GPUs:", ", and with the following GPUs:",
mManufacturer.mPart.c_str()); mManufacturer.mPart.c_str());
...@@ -669,10 +669,10 @@ class Scenario ...@@ -669,10 +669,10 @@ class Scenario
~Scenario() {} ~Scenario() {}
void logScenario() void logScenario()
{ {
ALOGD(" Scenario to compare against the rules"); ALOGV(" Scenario to compare against the rules");
ALOGD(" Application:"); ALOGV(" Application:");
mApplication.logItem(); mApplication.logItem();
ALOGD(" Device:"); ALOGV(" Device:");
mDevice.logItem(); mDevice.logItem();
} }
...@@ -704,7 +704,7 @@ class Rule ...@@ -704,7 +704,7 @@ class Rule
void addDev(Device &dev) { mDevList.addItem(dev); } void addDev(Device &dev) { mDevList.addItem(dev); }
bool match(Scenario &toCheck) bool match(Scenario &toCheck)
{ {
ALOGD(" Within \"%s\" Rule: application match is %s and device match is %s\n", ALOGV(" Within \"%s\" Rule: application match is %s and device match is %s\n",
mDescription.c_str(), mAppList.match(toCheck.mApplication) ? "true" : "false", mDescription.c_str(), mAppList.match(toCheck.mApplication) ? "true" : "false",
mDevList.match(toCheck.mDevice) ? "true" : "false"); mDevList.match(toCheck.mDevice) ? "true" : "false");
return (mAppList.match(toCheck.mApplication) && mDevList.match(toCheck.mDevice)); return (mAppList.match(toCheck.mApplication) && mDevList.match(toCheck.mDevice));
...@@ -713,7 +713,7 @@ class Rule ...@@ -713,7 +713,7 @@ class Rule
bool getAnswer() { return mAnswer; } bool getAnswer() { return mAnswer; }
void logRule() void logRule()
{ {
ALOGD(" Rule: \"%s\" %s ANGLE, and %s the app a choice if matched", mDescription.c_str(), ALOGV(" Rule: \"%s\" %s ANGLE, and %s the app a choice if matched", mDescription.c_str(),
mAnswer ? "enables" : "disables", mAppChoice ? "does give" : "does NOT give"); mAnswer ? "enables" : "disables", mAppChoice ? "does give" : "does NOT give");
mAppList.logListOf(" ", "Applications"); mAppList.logListOf(" ", "Applications");
mDevList.logListOf(" ", "Devices"); mDevList.logListOf(" ", "Devices");
...@@ -752,21 +752,21 @@ class RuleList ...@@ -752,21 +752,21 @@ class RuleList
// rule, but just in case, set it here too): // rule, but just in case, set it here too):
bool appChoice = true; bool appChoice = true;
int nRules = mRuleList.size(); int nRules = mRuleList.size();
ALOGD("Checking scenario against %d ANGLE-for-Android rules:", nRules); ALOGV("Checking scenario against %d ANGLE-for-Android rules:", nRules);
for (auto &it : mRuleList) for (auto &it : mRuleList)
{ {
ALOGD(" Checking Rule: \"%s\" (to see whether there's a match)", ALOGV(" Checking Rule: \"%s\" (to see whether there's a match)",
it.mDescription.c_str()); it.mDescription.c_str());
if (it.match(toCheck)) if (it.match(toCheck))
{ {
ALOGD(" -> Rule matches. Setting the app choice to %s", ALOGV(" -> Rule matches. Setting the app choice to %s",
it.getAppChoice() ? "true" : "false"); it.getAppChoice() ? "true" : "false");
appChoice = it.getAppChoice(); appChoice = it.getAppChoice();
} }
else else
{ {
ALOGD(" -> Rule doesn't match."); ALOGV(" -> Rule doesn't match.");
} }
} }
...@@ -778,21 +778,21 @@ class RuleList ...@@ -778,21 +778,21 @@ class RuleList
// rule, but just in case, set it here too): // rule, but just in case, set it here too):
bool answer = false; bool answer = false;
int nRules = mRuleList.size(); int nRules = mRuleList.size();
ALOGD("Checking scenario against %d ANGLE-for-Android rules:", nRules); ALOGV("Checking scenario against %d ANGLE-for-Android rules:", nRules);
for (auto &it : mRuleList) for (auto &it : mRuleList)
{ {
ALOGD(" Checking Rule: \"%s\" (to see whether there's a match)", ALOGV(" Checking Rule: \"%s\" (to see whether there's a match)",
it.mDescription.c_str()); it.mDescription.c_str());
if (it.match(toCheck)) if (it.match(toCheck))
{ {
ALOGD(" -> Rule matches. Setting the answer to %s", ALOGV(" -> Rule matches. Setting the answer to %s",
it.getAnswer() ? "true" : "false"); it.getAnswer() ? "true" : "false");
answer = it.getAnswer(); answer = it.getAnswer();
} }
else else
{ {
ALOGD(" -> Rule doesn't match."); ALOGV(" -> Rule doesn't match.");
} }
} }
...@@ -877,7 +877,7 @@ class RuleList ...@@ -877,7 +877,7 @@ class RuleList
void logRules() void logRules()
{ {
int nRules = mRuleList.size(); int nRules = mRuleList.size();
ALOGD("Showing %d ANGLE-for-Android rules:", nRules); ALOGV("Showing %d ANGLE-for-Android rules:", nRules);
for (auto &it : mRuleList) for (auto &it : mRuleList)
{ {
it.logRule(); it.logRule();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment