Commit a29cd9f7 authored by Andrea Valassi's avatar Andrea Valassi Committed by cdelort
Browse files

Clean up #ifdef COOL_ENABLE_TIMING_REPORT (CORALCOOL-2943)

git-svn-id: https://svnweb.cern.ch/trac/lcgcool/changeset/20132 4525493e-7705-40b1-a816-d608a930855b
parent 3d0e1261
......@@ -27,7 +27,7 @@
#error("ERROR: COOL >= 3.0.0 but this compiler does not support c++11")
#endif
// Drop support for TimingReport as of COOL 2.8.15 (task #31638)
// Drop support for TimingReport as of COOL 2.8.15 (CORALCOOL-2642)
#undef COOL_ENABLE_TIMING_REPORT
#endif // COOLKERNEL_VERSIONINFO_H
// Include files
#include <cstdlib> // for getenv
#include "CoolKernel/VersionInfo.h"
#include "CoolKernel/VersionInfo.h" // for COOL_ENABLE_TIMING_REPORT
// Local include files
#include "CoolChrono.h"
......
......@@ -4,7 +4,7 @@
// Include files
#include <string>
#include <vector>
#include "CoolKernel/VersionInfo.h"
#include "CoolKernel/VersionInfo.h" // for COOL_ENABLE_TIMING_REPORT
#include "SealUtil_BaseSealChrono.h"
#ifdef COOL_ENABLE_TIMING_REPORT
......
#include "CoolKernel/VersionInfo.h"
#include "CoolKernel/VersionInfo.h" // for COOL_ENABLE_TIMING_REPORT
#include "SealBase_TimeInfo.h"
#ifdef COOL_ENABLE_TIMING_REPORT
// ==========================================================================
// #include "SealBase/sysapi/TimeInfo.h"
# include <cerrno>
# ifdef _WIN32
# include <windows.h>
......@@ -31,7 +30,6 @@
# endif
// ==========================================================================
#include "SealBase_sysapi_Windows.h"
// see also http://high-res-timers.sourceforge.net/; linux kernel
// (arch/*/kernel/time.c; search get_cycles()); netbsd kernel;
......
......@@ -2,7 +2,7 @@
#define SEAL_BASE_TIME_INFO_H 1
#include "CoolKernel/types.h"
#include "CoolKernel/VersionInfo.h"
#include "CoolKernel/VersionInfo.h" // for COOL_ENABLE_TIMING_REPORT
#ifdef COOL_ENABLE_TIMING_REPORT
......
#ifndef SEAL_BASE_SYSAPI_WINDOWS_H
#define SEAL_BASE_SYSAPI_WINDOWS_H 1
#ifdef COOL_ENABLE_TIMING_REPORT
# ifdef _WIN32
#if 0
# include "SealBase/AutoLoad.h"
#endif
# include <windows.h>
extern "C" {
# include <powrprof.h>
}
//# include <ntdef.h>
//<<<<<< PUBLIC DEFINES >>>>>>
# define STATUS_SUCCESS ((NTSTATUS) 0x0L)
//# define NtQueryInformationProcess (*MyNtQueryInformationProcess)
//# define CallNtPowerInformation (*MyCallNtPowerInformation)
//# ifndef GetComputerNameEx
//# ifdef UNICODE
//# define GetComputerNameExW (*MyGetComputerNameExW)
//# else
//# define GetComputerNameExA (*MyGetComputerNameExA)
//# endif
//# endif
//<<<<<< PUBLIC CONSTANTS >>>>>>
//<<<<<< PUBLIC TYPES >>>>>>
// FIXME: This stuff lives in ntddk.h/ntddl.h, but apparently doesn't
// necessarily coexist with windows.h very well. So add the definitions
// we need here.
enum PROCESSINFOCLASS {
ProcessBasicInformation = 0,
ProcessQuotaLimits = 1,
ProcessVmCounters = 3,
ProcessTimes = 4
};
typedef LONG NTSTATUS;
typedef ULONG KAFFINITY;
typedef LONG KPRIORITY;
struct PROCESS_BASIC_INFORMATION {
NTSTATUS ExitStatus; // MSDN: PVOID Reserved1;
void *PebBaseAddress; // MSDN: PPEB PebBaseAddress;
KAFFINITY AffinityMask; // MSDN: PVOID Reserved2 [2];
KPRIORITY PriorityMask; // -- "" --
ULONG UniqueProcessId;
ULONG InheritedFromUniqueProcessId; // MSDN: PVOID Reserved3
};
typedef struct _PROCESSOR_POWER_INFORMATION {
ULONG Number;
ULONG MaxMhz;
ULONG CurrentMhz;
ULONG MhzLimit;
ULONG MaxIdleState;
ULONG CurrentIdleState;
} PROCESSOR_POWER_INFORMATION, *PPROCESSOR_POWER_INFORMATION;
//<<<<<< PUBLIC VARIABLES >>>>>>
//<<<<<< PUBLIC FUNCTIONS >>>>>>
// Work around functions we don't have appropriate headers for, or
// don't want to force everyone to know which libraries to link against.
#if 0
extern seal::AutoLoadLib WinStubNTDLL;
extern seal::AutoLoadLib WinStubKernel32;
extern seal::AutoLoadLib WinStubPowrprof;
extern seal::AutoLoad<NTSTATUS (HANDLE hProcess, PROCESSINFOCLASS pic,
PVOID pi, ULONG len, PULONG plen)>
MyNtQueryInformationProcess;
extern seal::AutoLoad<NTSTATUS (POWER_INFORMATION_LEVEL level, PVOID pin,
ULONG nin, PVOID pout, ULONG nout)>
MyCallNtPowerInformation;
extern seal::AutoLoad<BOOL (COMPUTER_NAME_FORMAT fmt, LPWSTR name, LPDWORD size)>
MyGetComputerNameExW;
extern seal::AutoLoad<BOOL (COMPUTER_NAME_FORMAT fmt, LPSTR name, LPDWORD size)>
MyGetComputerNameExA;
#endif
//<<<<<< CLASS DECLARATIONS >>>>>>
//<<<<<< INLINE PUBLIC FUNCTIONS >>>>>>
//<<<<<< INLINE MEMBER FUNCTIONS >>>>>>
# endif // _WIN32
#endif
#endif
......@@ -3,7 +3,7 @@
#include <string>
#include <vector>
#include "CoolKernel/VersionInfo.h"
#include "CoolKernel/VersionInfo.h" // for COOL_ENABLE_TIMING_REPORT
#ifdef COOL_ENABLE_TIMING_REPORT
......
#include "CoolKernel/VersionInfo.h"
#include "CoolKernel/VersionInfo.h" // for COOL_ENABLE_TIMING_REPORT
#include "TimingReport.h"
#include "SealUtil_BaseSealChrono.h"
#include "SealUtil_SealTimer.h"
......
......@@ -3,7 +3,7 @@
#include <iostream>
#include <string>
#include "CoolKernel/VersionInfo.h"
#include "CoolKernel/VersionInfo.h" // for COOL_ENABLE_TIMING_REPORT
#ifdef COOL_ENABLE_TIMING_REPORT
......
#include <assert.h>
#include <math.h>
#include "CoolKernel/VersionInfo.h"
#include "CoolKernel/VersionInfo.h" // for COOL_ENABLE_TIMING_REPORT
#include "SealUtil_TimingItem.h"
#ifdef COOL_ENABLE_TIMING_REPORT
......
#ifndef SEALUTIL_TIMINGITEM_H
#define SEALUTIL_TIMINGITEM_H 1
#include "CoolKernel/VersionInfo.h"
#include "CoolKernel/VersionInfo.h" // for COOL_ENABLE_TIMING_REPORT
#include "SealUtil_BaseSealChrono.h"
#ifdef COOL_ENABLE_TIMING_REPORT
......
......@@ -3,7 +3,7 @@
#include <cstdio> // For sprintf on gcc45
#include <cstring>
#include <iostream>
#include "CoolKernel/VersionInfo.h"
#include "CoolKernel/VersionInfo.h" // for COOL_ENABLE_TIMING_REPORT
#include "TimingReport.h"
......
......@@ -5,7 +5,7 @@
#include <map>
#include <string>
#include <boost/shared_ptr.hpp>
#include "CoolKernel/VersionInfo.h"
#include "CoolKernel/VersionInfo.h" // for COOL_ENABLE_TIMING_REPORT
#include "CoolChrono.h"
#include "SealUtil_TimingItem.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment