base: Clean up base/hostinfo

General fixes to the style of base/hostinfo.(cc|hh).

Remove unnecessary includes.

Remove signature of private functions from header.

Add documentation.

Remove unnecessary include in sim_events.cc.

Change-Id: I54e1f13231e512d26cf0127cc80256fb5e91bf91
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41393
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel R. Carvalho
2021-02-13 10:44:01 -03:00
committed by Daniel Carvalho
parent 7ca5ed70e6
commit eb76992dad
3 changed files with 15 additions and 22 deletions

View File

@@ -29,20 +29,20 @@
#ifndef __HOSTINFO_HH__
#define __HOSTINFO_HH__
#include <cstdint>
#include <string>
#include "base/types.hh"
std::string __get_hostname();
/**
* Get the host name for the current machine.
*
* @return The machine's host name.
*/
std::string &hostname();
uint64_t procInfo(const char *filename, const char *target);
/**
* Determine the simulator process' total virtual memory usage.
*
* @return virtual memory usage in kilobytes
* @return Virtual memory usage in kilobytes
*/
uint64_t memUsage();