Example #1
0
static 
int get_perf_counter_info(char *buf, 	/*  allocated area for info */
	       char **start, 	/*  return your own area if you allocate */
	       off_t pos,	/*  pos arg of vfs read */
	       int count,	/*  readable bytes */
	       int wr)		/*  1, for O_RDWR  */
{

	return  get_perf_info(
			perf_counter_ops->get_info,
			buf,
			start,
			pos,
			count,
			wr);
}
Example #2
0
std::string PerfLog::get_log() const
{
  std::ostringstream out;

  if (log_events)
    {
      // Only print the log
      // if it isn't empty
      if (!log.empty())
	{
	  // Possibly print machine info,
	  // but only do this once
	  if (!called)
	    {
	      called = true;
	      out << get_info_header();
	    }
	  out << get_perf_info();
	}
    }

  return out.str();
}