Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove MallocOpts as obsolete #36530

Merged
merged 1 commit into from Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 0 additions & 35 deletions FWCore/Services/plugins/SimpleMemoryCheck.cc
Expand Up @@ -39,7 +39,6 @@
#include "FWCore/ServiceRegistry/interface/StreamContext.h"
#include "FWCore/ServiceRegistry/interface/ModuleCallingContext.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/Utilities/interface/MallocOpts.h"
#include "FWCore/Utilities/interface/get_underlying_safe.h"

#include <cstring>
Expand Down Expand Up @@ -380,36 +379,6 @@ namespace edm {
// &SimpleMemoryCheck::preEventProcessing);
// iReg.watchPreModule(this,
// &SimpleMemoryCheck::preModule);

#ifndef __SANITIZE_ADDRESS__
typedef MallocOpts::opt_type opt_type;
MallocOptionSetter& mopts = getGlobalOptionSetter();

opt_type p_mmap_max = iPS.getUntrackedParameter<int>("M_MMAP_MAX"),
p_trim_thr = iPS.getUntrackedParameter<int>("M_TRIM_THRESHOLD"),
p_top_pad = iPS.getUntrackedParameter<int>("M_TOP_PAD"),
p_mmap_thr = iPS.getUntrackedParameter<int>("M_MMAP_THRESHOLD");

if (p_mmap_max >= 0)
mopts.set_mmap_max(p_mmap_max);
if (p_trim_thr >= 0)
mopts.set_trim_thr(p_trim_thr);
if (p_top_pad >= 0)
mopts.set_top_pad(p_top_pad);
if (p_mmap_thr >= 0)
mopts.set_mmap_thr(p_mmap_thr);

mopts.adjustMallocParams();

if (mopts.hasErrors()) {
LogWarning("MemoryCheck") << "ERROR: Problem with setting malloc options\n" << mopts.error_message();
}

if (iPS.getUntrackedParameter<bool>("dump") == true) {
MallocOpts mo = mopts.get();
LogWarning("MemoryCheck") << "Malloc options: " << mo << "\n";
}
#endif
}

SimpleMemoryCheck::~SimpleMemoryCheck() {
Expand All @@ -432,10 +401,6 @@ namespace edm {
desc.addUntracked<bool>("jobReportOutputOnly", false);
desc.addUntracked<bool>("monitorPssAndPrivate", false);
desc.addUntracked<bool>("moduleMemorySummary", false);
desc.addUntracked<int>("M_MMAP_MAX", -1);
desc.addUntracked<int>("M_TRIM_THRESHOLD", -1);
desc.addUntracked<int>("M_TOP_PAD", -1);
desc.addUntracked<int>("M_MMAP_THRESHOLD", -1);
desc.addUntracked<bool>("dump", false);
descriptions.add("SimpleMemoryCheck", desc);
}
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Services/test/BuildFile.xml
Expand Up @@ -11,7 +11,7 @@

<ifrelease name="!_ASAN_">
<bin file="TestFWCoreServicesDriver.cpp">
<flags TEST_RUNNER_ARGS=" /bin/bash FWCore/Services/test test_mallocopts.sh test_sitelocalconfig.sh test_resource.sh test_zombiekiller.sh"/>
<flags TEST_RUNNER_ARGS=" /bin/bash FWCore/Services/test test_sitelocalconfig.sh test_resource.sh test_zombiekiller.sh"/>
<use name="FWCore/Utilities"/>
</bin>
</ifrelease>
Expand Down
25 changes: 0 additions & 25 deletions FWCore/Services/test/mallocopts_cfg.py

This file was deleted.

15 changes: 0 additions & 15 deletions FWCore/Services/test/test_mallocopts.sh

This file was deleted.

94 changes: 0 additions & 94 deletions FWCore/Utilities/interface/MallocOpts.h

This file was deleted.