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:
parent
7298ba0992
commit
175366df44
2 changed files with 0 additions and 23 deletions
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue