-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pause MaxMemoryPreload for edmplugincache file reading in PluginManager
In a local developer area with many packages checked out, the PluginManager cache can be tens of megabytes larger than in a developer area without packages being checked out. This difference can result in false positive warnings in MaxMemoryPreload monitoring in PR tests. An easy way (even if hacky) out is to exclude the PluginManager cache from the MaxMemoryPreload monitoring.
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "PauseMaxMemoryPreloadSentry.h" | ||
|
||
// By default do nothing, but add "hooks" that MaxMemoryPreload can | ||
// override with LD_PRELOAD | ||
void pauseMaxMemoryPreload() {} | ||
void unpauseMaxMemoryPreload() {} | ||
|
||
namespace edm { | ||
PauseMaxMemoryPreloadSentry::PauseMaxMemoryPreloadSentry() { | ||
pauseMaxMemoryPreload(); | ||
} | ||
PauseMaxMemoryPreloadSentry::~PauseMaxMemoryPreloadSentry(){ | ||
unpauseMaxMemoryPreload(); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef FWCore_PluginManager_src_PauseMaxMemoryPreloadSentry_h | ||
#define FWCore_PluginManager_src_PauseMaxMemoryPreloadSentry_h | ||
|
||
namespace edm { | ||
class PauseMaxMemoryPreloadSentry { | ||
public: | ||
PauseMaxMemoryPreloadSentry(); | ||
~PauseMaxMemoryPreloadSentry(); | ||
|
||
PauseMaxMemoryPreloadSentry(const PauseMaxMemoryPreloadSentry&) = delete; | ||
PauseMaxMemoryPreloadSentry(PauseMaxMemoryPreloadSentry&&) = delete; | ||
PauseMaxMemoryPreloadSentry& operator=(const PauseMaxMemoryPreloadSentry&) = delete; | ||
PauseMaxMemoryPreloadSentry& operator=(PauseMaxMemoryPreloadSentry&&) = delete; | ||
}; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters