minix/kernel/arch/i386/include/arch_watchdog.h
Tomas Hruby e63b85a50b NMI sampling
- if profile --nmi kernel uses NMI watchdog based sampling based on
  Intel architecture performance counters

- using NMI makes kernel profiling possible

- watchdog kernel lockup detection is disabled while sampling as we
  may get unpredictable interrupts in kernel and thus possibly many
  false positives

- if watchdog is not enabled at boot time, profiling enables it and
  turns it of again when done
2010-09-23 10:49:45 +00:00

29 lines
463 B
C

#ifndef __I386_WATCHDOG_H__
#define __I386_WATCHDOG_H__
#include "kernel/kernel.h"
struct nmi_frame {
reg_t eax;
reg_t ecx;
reg_t edx;
reg_t ebx;
reg_t esp;
reg_t ebp;
reg_t esi;
reg_t edi;
u16_t gs;
u16_t fs;
u16_t es;
u16_t ds;
reg_t pc; /* arch independent name for program counter */
reg_t cs;
reg_t eflags;
};
_PROTOTYPE(int i386_watchdog_start, (void));
#define nmi_in_kernel(f) ((f)->cs == CS_SELECTOR)
#endif /* __I386_WATCHDOG_H__ */