liblog: remove android_lookupEventTag

This function has been marked deprecated for quite some time, has no
users, and isn't in liblog.map.txt.

Test: build
Change-Id: Ic3bf47c780b18a5d4f1e997b9265be76049fb824
This commit is contained in:
Tom Cherry 2020-08-11 09:20:18 -07:00
parent 7298ba0992
commit 175366df44
2 changed files with 0 additions and 23 deletions

View file

@ -559,21 +559,6 @@ const char* android_lookupEventFormat_len(const EventTagMap* map, size_t* len, u
return str->second.data();
}
// This function is deprecated and replaced with android_lookupEventTag_len
// since it will cause the map to change from Shared and backed by a file,
// to Private Dirty and backed up by swap, albeit highly compressible. By
// deprecating this function everywhere, we save 100s of MB of memory space.
const char* android_lookupEventTag(const EventTagMap* map, unsigned int tag) {
size_t len;
const char* tagStr = android_lookupEventTag_len(map, &len, tag);
if (!tagStr) return tagStr;
char* cp = const_cast<char*>(tagStr);
cp += len;
if (*cp) *cp = '\0'; // Trigger copy on write :-( and why deprecated.
return tagStr;
}
// Look up tagname, generate one if necessary, and return a tag
int android_lookupEventTagNum(EventTagMap* map, const char* tagname, const char* format, int prio) {
const char* ep = endOfTag(tagname);

View file

@ -39,14 +39,6 @@ EventTagMap* android_openEventTagMap(const char* fileName);
*/
void android_closeEventTagMap(EventTagMap* map);
/*
* Look up a tag by index. Returns the tag string, or NULL if not found.
*/
const char* android_lookupEventTag(const EventTagMap* map, unsigned int tag)
__attribute__((
deprecated("use android_lookupEventTag_len() instead to minimize "
"MAP_PRIVATE copy-on-write memory impact")));
/*
* Look up a tag by index. Returns the tag string & string length, or NULL if
* not found. Returned string is not guaranteed to be nul terminated.