Bug 1838398 - Add env variable to override output dir for external performance marker files. r=mstange

Currently these get output to the current working directory. On
Android, however, we cannot write to that directory, so this
environment variable can be used to set a directory that is writeable.

Differential Revision: https://phabricator.services.mozilla.com/D190289
This commit is contained in:
Jamie Nicol 2023-10-06 20:56:06 +00:00
parent 2b8a50167f
commit 51c68d3e2a

View File

@ -573,6 +573,9 @@ DOMHighResTimeStamp Performance::ResolveStartTimeForMeasure(
static std::string GetMarkerFilename() {
std::stringstream s;
if (char* markerDir = getenv("MOZ_PERFORMANCE_MARKER_DIR")) {
s << markerDir << "/";
}
#ifdef XP_WIN
s << "marker-" << GetCurrentProcessId() << ".txt";
#else