/** @brief Turn off the current Resource */
virtual void turn_off();
/** @brief setup the trace file with states events (ON or OFF). Trace must contain boolean values. */
- virtual void set_state_trace(profile::Profile* trace);
+ virtual void set_state_profile(profile::Profile* profile);
+
+#ifndef DOXYGEN
+ XBT_ATTRIB_DEPRECATED_v325("Please use Resource::set_state_profile()") virtual void set_state_trace(
+ profile::Profile* profile)
+ {
+ set_state_profile(profile);
+ }
+#endif
private:
std::string name_;
void* get_data(); /** Should be used only from the C interface. Prefer extensions in C++ */
void set_data(void* d);
- void set_state_trace(
- kernel::profile::Profile* trace); /*< setup the trace file with states events (ON or OFF). Trace must contain
- boolean values. */
- void set_bandwidth_trace(
- kernel::profile::Profile* trace); /*< setup the trace file with bandwidth events (peak speed changes due to
- external load). Trace must contain percentages (value between 0 and 1). */
- void set_latency_trace(
- kernel::profile::Profile* trace); /*< setup the trace file with latency events (peak latency changes due to
- external load). Trace must contain absolute values */
+#ifndef DOXYGEN
+ XBT_ATTRIB_DEPRECATED_v325("Please use Link::set_state_profile()") void set_state_trace(
+ kernel::profile::Profile* profile)
+ {
+ set_state_profile(profile);
+ }
+ XBT_ATTRIB_DEPRECATED_v325("Please use Link::set_bandwidth_profile()") void set_bandwidth_trace(
+ kernel::profile::Profile* profile)
+ {
+ set_bandwidth_profile(profile);
+ }
+ XBT_ATTRIB_DEPRECATED_v325("Please use Link::set_latency_profile()") void set_latency_trace(
+ kernel::profile::Profile* profile)
+ {
+ set_latency_profile(profile);
+ }
+#endif
+
+ /** Setup the profile file with states events (ON or OFF). The profile must contain boolean values. */
+ void set_state_profile(kernel::profile::Profile* profile);
+ /** Setup the profile file with bandwidth events (peak speed changes due to external load).
+ * The profile must contain percentages (value between 0 and 1). */
+ void set_bandwidth_profile(kernel::profile::Profile* profile);
+ /** Setup the profile file with latency events (peak latency changes due to external load).
+ * The profile must contain absolute values */
+ void set_latency_profile(kernel::profile::Profile* profile);
const char* get_property(std::string key);
void set_property(std::string key, std::string value);
XBT_ATTRIB_DEPRECATED_v323("Please use Link::set_data()") void setData(void* d) {set_data(d);}
/** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_state_trace()") void setStateTrace(
+ XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_state_profile()") void setStateTrace(
simgrid::kernel::profile::Profile* trace)
{
- set_state_trace(trace);
+ set_state_profile(trace);
}
/** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_bandwidth_trace()") void setBandwidthTrace(
+ XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_bandwidth_profile()") void setBandwidthTrace(
simgrid::kernel::profile::Profile* trace)
{
- set_bandwidth_trace(trace);
+ set_bandwidth_profile(trace);
}
/** @deprecated */
- XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_latency_trace()") void setLatencyTrace(
+ XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_latency_profile()") void setLatencyTrace(
simgrid::kernel::profile::Profile* trace)
{
- set_latency_trace(trace);
+ set_latency_profile(trace);
}
#endif
};
return name_ == other.name_;
}
-void Resource::set_state_trace(profile::Profile* trace)
+void Resource::set_state_profile(profile::Profile* profile)
{
- xbt_assert(state_event_ == nullptr, "Cannot set a second state trace to %s", get_cname());
+ xbt_assert(state_event_ == nullptr, "Cannot set a second state profile to %s", get_cname());
- state_event_ = future_evt_set.add_trace(trace, this);
+ state_event_ = future_evt_set.add_trace(profile, this);
}
kernel::lmm::Constraint* Resource::get_constraint() const
simgrid::simix::simcall([this, d]() { this->pimpl_->set_data(d); });
}
-void Link::set_state_trace(kernel::profile::Profile* trace)
+void Link::set_state_profile(kernel::profile::Profile* profile)
{
- simgrid::simix::simcall([this, trace]() { this->pimpl_->set_state_trace(trace); });
+ simgrid::simix::simcall([this, profile]() { this->pimpl_->set_state_profile(profile); });
}
-void Link::set_bandwidth_trace(kernel::profile::Profile* trace)
+void Link::set_bandwidth_profile(kernel::profile::Profile* profile)
{
- simgrid::simix::simcall([this, trace]() { this->pimpl_->set_bandwidth_trace(trace); });
+ simgrid::simix::simcall([this, profile]() { this->pimpl_->set_bandwidth_profile(profile); });
}
-void Link::set_latency_trace(kernel::profile::Profile* trace)
+void Link::set_latency_profile(kernel::profile::Profile* trace)
{
- simgrid::simix::simcall([this, trace]() { this->pimpl_->set_latency_trace(trace); });
+ simgrid::simix::simcall([this, trace]() { this->pimpl_->set_latency_profile(trace); });
}
const char* Link::get_property(std::string key)
return core_count_;
}
-void Cpu::set_speed_trace(kernel::profile::Profile* trace)
+void Cpu::set_speed_profile(kernel::profile::Profile* profile)
{
xbt_assert(speed_.event == nullptr, "Cannot set a second speed trace to Host %s", host_->get_cname());
- speed_.event = future_evt_set.add_trace(trace, this);
+ speed_.event = future_evt_set.add_trace(profile, this);
}
/*< @brief Setup the trace file with availability events (peak speed changes due to external load).
* Trace must contain relative values (ratio between 0 and 1)
*/
- virtual void set_speed_trace(kernel::profile::Profile* trace);
+ virtual void set_speed_profile(kernel::profile::Profile* profile);
protected:
Metric speed_ = {1.0, 0, nullptr};
set_modified(false);
delete speed_integrated_trace_;
}
-void CpuTi::set_speed_trace(kernel::profile::Profile* profile)
+void CpuTi::set_speed_profile(kernel::profile::Profile* profile)
{
delete speed_integrated_trace_;
speed_integrated_trace_ = new CpuTiTmgr(profile, speed_.scale);
CpuTi(CpuTiModel* model, simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core);
~CpuTi() override;
- void set_speed_trace(kernel::profile::Profile* profile) override;
+ void set_speed_profile(kernel::profile::Profile* profile) override;
void apply_event(kernel::profile::Event* event, double value) override;
void update_actions_finish_time(double now);
s4u::Link::on_bandwidth_change(this->piface_);
}
-void LinkImpl::set_bandwidth_trace(profile::Profile* trace)
+void LinkImpl::set_bandwidth_profile(profile::Profile* profile)
{
- xbt_assert(bandwidth_.event == nullptr, "Cannot set a second bandwidth trace to Link %s", get_cname());
- bandwidth_.event = future_evt_set.add_trace(trace, this);
+ xbt_assert(bandwidth_.event == nullptr, "Cannot set a second bandwidth profile to Link %s", get_cname());
+ bandwidth_.event = future_evt_set.add_trace(profile, this);
}
-void LinkImpl::set_latency_trace(profile::Profile* trace)
+void LinkImpl::set_latency_profile(profile::Profile* profile)
{
- xbt_assert(latency_.event == nullptr, "Cannot set a second latency trace to Link %s", get_cname());
- latency_.event = future_evt_set.add_trace(trace, this);
+ xbt_assert(latency_.event == nullptr, "Cannot set a second latency profile to Link %s", get_cname());
+ latency_.event = future_evt_set.add_trace(profile, this);
}
/**********
void on_bandwidth_change();
- virtual void set_bandwidth_trace(kernel::profile::Profile* trace); /*< setup the trace file with bandwidth events
- (peak speed changes due to external load). Trace must
- contain percentages (value between 0 and 1). */
virtual void
- set_latency_trace(kernel::profile::Profile* trace); /*< setup the trace file with latency events (peak
+ set_bandwidth_profile(kernel::profile::Profile* profile); /*< setup the profile file with bandwidth events
+ (peak speed changes due to external load). Trace must
+ contain percentages (value between 0 and 1). */
+ virtual void
+ set_latency_profile(kernel::profile::Profile* profile); /*< setup the trace file with latency events (peak
latency changes due to external load). Trace must contain
absolute values */
{
THROW_UNIMPLEMENTED;
}
-void LinkNS3::set_bandwidth_trace(profile::Profile* profile)
+void LinkNS3::set_bandwidth_profile(profile::Profile* profile)
{
- xbt_die("The NS3 network model doesn't support bandwidth traces");
+ xbt_die("The NS3 network model doesn't support bandwidth profiles");
}
-void LinkNS3::set_latency_trace(profile::Profile* profile)
+void LinkNS3::set_latency_profile(profile::Profile* profile)
{
- xbt_die("The NS3 network model doesn't support latency traces");
+ xbt_die("The NS3 network model doesn't support latency profiles");
}
/**********
void apply_event(simgrid::kernel::profile::Event* event, double value) override;
void set_bandwidth(double value) override { THROW_UNIMPLEMENTED; }
void set_latency(double value) override { THROW_UNIMPLEMENTED; }
- void set_bandwidth_trace(profile::Profile* profile) override;
- void set_latency_trace(profile::Profile* profile) override;
+ void set_bandwidth_profile(profile::Profile* profile) override;
+ void set_latency_profile(profile::Profile* profile) override;
};
/**********
/* Change from the defaults */
if (args->state_trace)
- host->pimpl_cpu->set_state_trace(args->state_trace);
+ host->pimpl_cpu->set_state_profile(args->state_trace);
if (args->speed_trace)
- host->pimpl_cpu->set_speed_trace(args->speed_trace);
+ host->pimpl_cpu->set_speed_profile(args->speed_trace);
if (args->pstate != 0)
host->pimpl_cpu->set_pstate(args->pstate);
if (args->coord && strcmp(args->coord, ""))
}
if (link->latency_trace)
- l->set_latency_trace(link->latency_trace);
+ l->set_latency_profile(link->latency_trace);
if (link->bandwidth_trace)
- l->set_bandwidth_trace(link->bandwidth_trace);
+ l->set_bandwidth_profile(link->bandwidth_trace);
if (link->state_trace)
- l->set_state_trace(link->state_trace);
+ l->set_state_profile(link->state_trace);
}
delete link->properties;
}
/* Change from the defaults */
if (peer->state_trace)
- host->pimpl_cpu->set_state_trace(peer->state_trace);
+ host->pimpl_cpu->set_state_profile(peer->state_trace);
if (peer->speed_trace)
- host->pimpl_cpu->set_speed_trace(peer->speed_trace);
+ host->pimpl_cpu->set_speed_profile(peer->speed_trace);
}
/* Pick the right models for CPU, net and host, and call their model_init_preparse */
/* connect all profiles relative to hosts */
for (auto const& elm : trace_connect_list_host_avail) {
xbt_assert(traces_set_list.find(elm.first) != traces_set_list.end(), "Trace %s undefined", elm.first.c_str());
- simgrid::kernel::profile::Profile* trace = traces_set_list.at(elm.first);
+ simgrid::kernel::profile::Profile* profile = traces_set_list.at(elm.first);
simgrid::s4u::Host* host = sg_host_by_name(elm.second.c_str());
xbt_assert(host, "Host %s undefined", elm.second.c_str());
simgrid::surf::Cpu* cpu = host->pimpl_cpu;
- cpu->set_state_trace(trace);
+ cpu->set_state_profile(profile);
}
for (auto const& elm : trace_connect_list_host_speed) {
xbt_assert(traces_set_list.find(elm.first) != traces_set_list.end(), "Trace %s undefined", elm.first.c_str());
- simgrid::kernel::profile::Profile* trace = traces_set_list.at(elm.first);
+ simgrid::kernel::profile::Profile* profile = traces_set_list.at(elm.first);
simgrid::s4u::Host* host = sg_host_by_name(elm.second.c_str());
xbt_assert(host, "Host %s undefined", elm.second.c_str());
simgrid::surf::Cpu* cpu = host->pimpl_cpu;
- cpu->set_speed_trace(trace);
+ cpu->set_speed_profile(profile);
}
for (auto const& elm : trace_connect_list_link_avail) {
xbt_assert(traces_set_list.find(elm.first) != traces_set_list.end(), "Trace %s undefined", elm.first.c_str());
- simgrid::kernel::profile::Profile* trace = traces_set_list.at(elm.first);
+ simgrid::kernel::profile::Profile* profile = traces_set_list.at(elm.first);
sg_link_t link = simgrid::s4u::Link::by_name(elm.second.c_str());
xbt_assert(link, "Link %s undefined", elm.second.c_str());
- link->set_state_trace(trace);
+ link->set_state_profile(profile);
}
for (auto const& elm : trace_connect_list_link_bw) {
xbt_assert(traces_set_list.find(elm.first) != traces_set_list.end(), "Trace %s undefined", elm.first.c_str());
- simgrid::kernel::profile::Profile* trace = traces_set_list.at(elm.first);
+ simgrid::kernel::profile::Profile* profile = traces_set_list.at(elm.first);
sg_link_t link = simgrid::s4u::Link::by_name(elm.second.c_str());
xbt_assert(link, "Link %s undefined", elm.second.c_str());
- link->set_bandwidth_trace(trace);
+ link->set_bandwidth_profile(profile);
}
for (auto const& elm : trace_connect_list_link_lat) {
xbt_assert(traces_set_list.find(elm.first) != traces_set_list.end(), "Trace %s undefined", elm.first.c_str());
- simgrid::kernel::profile::Profile* trace = traces_set_list.at(elm.first);
+ simgrid::kernel::profile::Profile* profile = traces_set_list.at(elm.first);
sg_link_t link = simgrid::s4u::Link::by_name(elm.second.c_str());
xbt_assert(link, "Link %s undefined", elm.second.c_str());
- link->set_latency_trace(trace);
+ link->set_latency_profile(profile);
}
surf_parse_close();