Skip to content

Commit

Permalink
Minor spelling corrections in profile (apache#10526)
Browse files Browse the repository at this point in the history
  • Loading branch information
KellenSunderland authored and piiswrong committed Apr 12, 2018
1 parent f0e4db2 commit d2b6716
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/profiler/profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Profiler::Profiler()
if (dmlc::GetEnv("MXNET_PROFILER_AUTOSTART", 0)) {
this->state_ = ProfilerState::kRunning;
this->enable_output_ = true;
// Since we want to avoid interfering with pure-VTune analylisys runs, for not set,
// Since we want to avoid interfering with pure-VTune analysis runs, for not set,
// vtune will be recording based upon whether "Start" or "STart Paused" was selected
vtune::vtune_resume();
}
Expand Down Expand Up @@ -163,17 +163,17 @@ void Profiler::EmitPid(std::ostream *os, const std::string& name, size_t pid) {
<< " }";
}

void Profiler::DumpProfile(bool peform_cleanup) {
void Profiler::DumpProfile(bool perform_cleanup) {
std::lock_guard<std::recursive_mutex> lock{this->m_};
if (!IsEnableOutput()) {
return;
}
if (peform_cleanup) {
if (perform_cleanup) {
SetContinuousProfileDump(false, 1.0f);
}
std::ofstream file;
const bool first_pass = ++profile_dump_count_ == 1;
const bool last_pass = peform_cleanup || !continuous_dump_;
const bool last_pass = perform_cleanup || !continuous_dump_;
if (!first_pass && continuous_dump_) {
file.open(filename_, std::ios::app|std::ios::out);
} else {
Expand Down
8 changes: 4 additions & 4 deletions src/profiler/profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ class Profiler {
}
/*!
* \brief dump the profile file
* \param peform_cleanup Close off the json trace structures (ie last pass)
* \param perform_cleanup Close off the json trace structures (ie last pass)
*/
void DumpProfile(bool peform_cleanup = true);
void DumpProfile(bool perform_cleanup = true);

/*! \return the profiler init time, time unit is microsecond (10^-6) s */
uint64_t MSHADOW_CINLINE GetInitTime() const {
Expand Down Expand Up @@ -477,7 +477,7 @@ class Profiler {
/*! \brief Maintain in-memory aggregate stats for print output.
* \warning This has a negative performance impact */
std::shared_ptr<AggregateStats> aggregate_stats_ = nullptr;
/*! \brief Asynchronous operation thread lifecycly control object */
/*! \brief Asynchronous operation thread lifecycle control object */
std::shared_ptr<dmlc::ThreadGroup> thread_group_ = std::make_shared<dmlc::ThreadGroup>();
/* !\brief pids */
std::unordered_set<uint32_t> process_ids_;
Expand Down Expand Up @@ -555,7 +555,7 @@ struct ProfileDomain : public ProfileObject {
*/
struct ProfileCounter : public ProfileObject {
/*!
* \brief Co9nstructor
* \brief Constructor
* \param name Counter name
* \param domain Counter domain
*/
Expand Down

0 comments on commit d2b6716

Please sign in to comment.