The profile utility can set the sprofiling mode
- profile --nmi | --rtc sets the profiling mode - --rtc is default, uses BIOS RTC, cannot profile kernel the presetted frequency values apply - --nmi is only available in APIC mode as it uses the NMI watchdog, -f allows any frequency in Hz - both modes use compatible data structures
This commit is contained in:
@@ -590,6 +590,7 @@
|
||||
#define PROF_MEM_SIZE m7_i2 /* available memory for data */
|
||||
#define PROF_FREQ m7_i3 /* sample frequency */
|
||||
#define PROF_ENDPT m7_i4 /* endpoint of caller */
|
||||
#define PROF_INTR_TYPE m7_i5 /* interrupt type */
|
||||
#define PROF_CTL_PTR m7_p1 /* location of info struct */
|
||||
#define PROF_MEM_PTR m7_p2 /* location of profiling data */
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ typedef struct {long m4l1, m4l2, m4l3, m4l4, m4l5;} mess_4;
|
||||
typedef struct {short m5s1, m5s2; int m5i1, m5i2; long m5l1, m5l2, m5l3;}mess_5;
|
||||
typedef struct {long m6l1, m6l2, m6l3; short m6s1, m6s2, m6s3; char m6c1, m6c2;
|
||||
char *m6p1, *m6p2;} mess_6;
|
||||
typedef struct {int m7i1, m7i2, m7i3, m7i4; char *m7p1, *m7p2;} mess_7;
|
||||
typedef struct {int m7i1, m7i2, m7i3, m7i4, m7i5; char *m7p1, *m7p2;} mess_7;
|
||||
typedef struct {int m8i1, m8i2; char *m8p1, *m8p2, *m8p3, *m8p4;} mess_8;
|
||||
typedef struct {long m9l1, m9l2, m9l3, m9l4, m9l5;
|
||||
short m9s1, m9s2, m9s3, m9s4; } mess_9;
|
||||
@@ -94,6 +94,7 @@ typedef struct {
|
||||
#define m7_i2 m_u.m_m7.m7i2
|
||||
#define m7_i3 m_u.m_m7.m7i3
|
||||
#define m7_i4 m_u.m_m7.m7i4
|
||||
#define m7_i5 m_u.m_m7.m7i5
|
||||
#define m7_p1 m_u.m_m7.m7p1
|
||||
#define m7_p2 m_u.m_m7.m7p2
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
# define PROF_START 0 /* start statistical profiling */
|
||||
# define PROF_STOP 1 /* stop statistical profiling */
|
||||
|
||||
#define PROF_RTC 0 /* RTC based profiling */
|
||||
#define PROF_NMI 1 /* NMI based profiling, profiles kernel too */
|
||||
|
||||
/* Info struct to be copied to from kernel to user program. */
|
||||
struct sprof_info_s {
|
||||
int mem_used;
|
||||
@@ -101,7 +104,7 @@ struct cprof_tbl_s {
|
||||
u64_t cycles; /* execution time of path, in cycles */
|
||||
} cprof_tbl_inst;
|
||||
|
||||
_PROTOTYPE( int sprofile, (int action, int size, int freq,
|
||||
_PROTOTYPE( int sprofile, (int action, int size, int freq, int type,
|
||||
void *ctl_ptr, void *mem_ptr) );
|
||||
|
||||
_PROTOTYPE( int cprofile, (int action, int size, void *ctl_ptr,
|
||||
|
||||
@@ -257,7 +257,7 @@ _PROTOTYPE( int pci_get_bar, (int devind, int port, u32_t *base,
|
||||
u32_t *size, int *ioflag) );
|
||||
|
||||
/* Profiling. */
|
||||
_PROTOTYPE( int sys_sprof, (int action, int size, int freq,
|
||||
_PROTOTYPE( int sys_sprof, (int action, int size, int freq, int type,
|
||||
endpoint_t endpt, void *ctl_ptr, void *mem_ptr) );
|
||||
_PROTOTYPE( int sys_cprof, (int action, int size, endpoint_t endpt,
|
||||
void *ctl_ptr, void *mem_ptr) );
|
||||
|
||||
Reference in New Issue
Block a user