2019-07-31 14:06:13 -07:00
|
|
|
// Matrix Construct
|
|
|
|
//
|
|
|
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
|
|
|
// Copyright (C) 2016-2019 Jason Volk <jason@zemos.net>
|
|
|
|
//
|
|
|
|
// Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
// purpose with or without fee is hereby granted, provided that the above
|
|
|
|
// copyright notice and this permission notice is present in all copies. The
|
|
|
|
// full license for this software is available in the LICENSE file.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#define HAVE_IRCD_PROF_H
|
|
|
|
|
|
|
|
namespace ircd::prof
|
|
|
|
{
|
|
|
|
struct event;
|
|
|
|
using group = std::vector<std::unique_ptr<event>>;
|
|
|
|
IRCD_EXCEPTION(ircd::error, error)
|
|
|
|
IRCD_OVERLOAD(sample)
|
|
|
|
|
|
|
|
// Samples
|
2019-08-05 16:15:56 -07:00
|
|
|
uint64_t time_user() noexcept; ///< Nanoseconds of CPU time in userspace.
|
|
|
|
uint64_t time_kern() noexcept; ///< Nanoseconds of CPU time in kernelland.
|
|
|
|
uint64_t time_real() noexcept; ///< Nanoseconds of CPU time real.
|
|
|
|
uint64_t time_proc(); ///< Nanoseconds of CPU time for process.
|
|
|
|
uint64_t time_thrd(); ///< Nanoseconds of CPU time for thread.
|
2019-07-31 14:06:13 -07:00
|
|
|
|
|
|
|
// Control panel
|
|
|
|
void stop(group &);
|
|
|
|
void start(group &);
|
|
|
|
void reset(group &);
|
2020-03-06 15:30:32 -08:00
|
|
|
|
|
|
|
extern log::log log;
|
2019-07-31 14:06:13 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
#include "x86.h"
|
2020-08-20 19:37:53 -07:00
|
|
|
#include "arm.h"
|
2019-07-31 14:06:13 -07:00
|
|
|
#include "vg.h"
|
2019-09-21 11:58:33 -07:00
|
|
|
#include "type.h"
|
2020-02-27 19:08:09 -08:00
|
|
|
#include "cycles.h"
|
2019-09-21 12:13:24 -07:00
|
|
|
#include "scope_cycles.h"
|
2019-07-31 14:06:13 -07:00
|
|
|
#include "syscall_timer.h"
|
2020-03-06 15:19:05 -08:00
|
|
|
#include "syscall_usage_warning.h"
|
2019-07-31 14:06:13 -07:00
|
|
|
#include "instructions.h"
|
|
|
|
#include "resource.h"
|
|
|
|
#include "times.h"
|
|
|
|
#include "system.h"
|
2019-10-08 17:01:48 -07:00
|
|
|
#include "psi.h"
|