MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / run

Method run

src/profiler.cpp:1612–1625  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1610}
1611
1612Error Profiler::run(Arguments& args) {
1613 if (!args.hasOutputFile()) {
1614 LogWriter out;
1615 return runInternal(args, out);
1616 } else {
1617 // Open output file under the lock to avoid races with background timer
1618 MutexLocker ml(_state_lock);
1619 FileWriter out(args.file());
1620 if (!out.is_open()) {
1621 return Error("Could not open output file");
1622 }
1623 return runInternal(args, out);
1624 }
1625}
1626
1627Error Profiler::expire(Arguments& args, bool restart) {
1628 MutexLocker ml(_state_lock);

Callers 3

startProfilerMethod · 0.45
VMInitMethod · 0.45
Agent_OnAttachFunction · 0.45

Calls 4

ErrorClass · 0.85
hasOutputFileMethod · 0.80
is_openMethod · 0.80
fileMethod · 0.45

Tested by

no test coverage detected