44 if (
void *sym = dlsym(
nullptr,
"igprof_dump_now")) {
45 dump_ = __extension__(
void (*)(
const char *)) sym;
47 edm::LogWarning(
"IgProfModule") <<
"IgProfModule requested but application is not" 48 <<
" currently being profiled with igprof\n";
126 if (!
dump_ || format.empty())
136 dump_(
final.c_str());
141 size_t patlen = strlen(pat);
143 while ((pos = result.find(pat, pos)) != std::string::npos) {
145 int n = sprintf(buf,
"%d", val);
146 result.replace(pos, patlen, buf);
147 pos = pos - patlen +
n;
155 size_t patlen = strlen(pat);
157 while ((pos = result.find(pat, pos)) != std::string::npos) {
159 int n = sprintf(buf,
"%llu", val);
160 result.replace(pos, patlen, buf);
161 pos = pos - patlen +
n;
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
void watchPreEvent(PreEvent::slot_type const &iSlot)
std::string atPostEndLumi_
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
std::string atPostEndJob_
void watchPostEvent(PostEvent::slot_type const &iSlot)
void postCloseFile(std::string const &, bool)
LuminosityBlockID const & luminosityBlockID() const
void watchPostGlobalBeginLumi(PostGlobalBeginLumi::slot_type const &iSlot)
IgProfService(const ParameterSet &, ActivityRegistry &)
void postEndRun(GlobalContext const &gc)
edm::LuminosityBlockNumber_t nlumi_
std::string atPostBeginRun_
std::string atPostOpenFile_
static std::string replaceU64(const std::string &s, const char *pat, unsigned long long val)
void watchPostGlobalBeginRun(PostGlobalBeginRun::slot_type const &iSlot)
void postEvent(StreamContext const &sc)
void watchPostCloseFile(PostCloseFile::slot_type const &iSlot)
std::string atPostEndRun_
void postOpenFile(std::string const &, bool)
std::string atPostCloseFile_
void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const &iSlot)
#define DEFINE_FWK_SERVICE(type)
void(* dump_)(const char *)
void postBeginLumi(GlobalContext const &gc)
std::string atPostBeginLumi_
void postEndLumi(GlobalContext const &gc)
edm::EventNumber_t nevent_
void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const &iSlot)
LuminosityBlockNumber_t luminosityBlock() const
void watchPostOpenFile(PostOpenFile::slot_type const &iSlot)
void preEvent(StreamContext const &sc)
EventID const & eventID() const
void makeDump(const std::string &format)
std::string atPostBeginJob_
static std::string replace(const std::string &s, const char *pat, int val)
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
void postBeginRun(GlobalContext const &gc)