8003209: JFR events for network utilization

Reviewed-by: mgronlun, egahlin
This commit is contained in:
Robin Westberg 2018-06-28 15:06:55 +02:00
parent 724ba7feb2
commit b11c7752e8
19 changed files with 1350 additions and 10 deletions

View file

@ -1041,3 +1041,49 @@ int CPUInformationInterface::cpu_information(CPUInformation& cpu_info) {
cpu_info = *_cpu_info; // shallow copy assignment
return OS_OK;
}
class NetworkPerformanceInterface::NetworkPerformance : public CHeapObj<mtInternal> {
friend class NetworkPerformanceInterface;
private:
NetworkPerformance();
NetworkPerformance(const NetworkPerformance& rhs); // no impl
NetworkPerformance& operator=(const NetworkPerformance& rhs); // no impl
bool initialize();
~NetworkPerformance();
int network_utilization(NetworkInterface** network_interfaces) const;
};
NetworkPerformanceInterface::NetworkPerformance::NetworkPerformance() {
}
bool NetworkPerformanceInterface::NetworkPerformance::initialize() {
return true;
}
NetworkPerformanceInterface::NetworkPerformance::~NetworkPerformance() {
}
int NetworkPerformanceInterface::NetworkPerformance::network_utilization(NetworkInterface** network_interfaces) const
{
return FUNCTIONALITY_NOT_IMPLEMENTED;
}
NetworkPerformanceInterface::NetworkPerformanceInterface() {
_impl = NULL;
}
NetworkPerformanceInterface::~NetworkPerformanceInterface() {
if (_impl != NULL) {
delete _impl;
}
}
bool NetworkPerformanceInterface::initialize() {
_impl = new NetworkPerformanceInterface::NetworkPerformance();
return _impl != NULL && _impl->initialize();
}
int NetworkPerformanceInterface::network_utilization(NetworkInterface** network_interfaces) const {
return _impl->network_utilization(network_interfaces);
}