Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/pmclog.h
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | enum pmclog_type { | ||||
*/ | */ | ||||
PMCLOG_TYPE_PMCALLOCATEDYN = 17, | PMCLOG_TYPE_PMCALLOCATEDYN = 17, | ||||
/* | /* | ||||
* V6 ABI | * V6 ABI | ||||
*/ | */ | ||||
PMCLOG_TYPE_THR_CREATE = 18, | PMCLOG_TYPE_THR_CREATE = 18, | ||||
PMCLOG_TYPE_THR_EXIT = 19, | PMCLOG_TYPE_THR_EXIT = 19, | ||||
PMCLOG_TYPE_PROC_CREATE = 20 | PMCLOG_TYPE_PROC_CREATE = 20 | ||||
}; | }; | ||||
jhb: Given the other comments in this block, it might make sense to allocate a new number for the… | |||||
Done Inline ActionsABI breaking changes have been made to existing log types without renumbering them. From looking at the history myself, it seems that there's a difference between tweaking an existing record, which doesn't get a new number, just an ABI bump, and adding a new one that's a complete rethink of the old approach, which does get a new number. I don't really see what purpose leaving the old number reserved serves when the version number in the log gives you an unambiguous way to determine what the format is. jrtc27: ABI breaking changes have been made to existing log types without renumbering them. From… | |||||
Done Inline Actions(and new number comes with new name) jrtc27: (and new number comes with new name) | |||||
/* | /* | ||||
* A log entry descriptor comprises of a 32 bit header and a 64 bit | * A log entry descriptor comprises of a 32 bit header and a 64 bit | ||||
* time stamp followed by as many 32 bit words are required to record | * time stamp followed by as many 32 bit words are required to record | ||||
* the event. | * the event. | ||||
* | * | ||||
* Header field format: | * Header field format: | ||||
* | * | ||||
▲ Show 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | struct pmclog_proccreate { | ||||
uint32_t pl_flags; | uint32_t pl_flags; | ||||
char pl_pcomm[MAXCOMLEN+1]; /* keep 8 byte aligned */ | char pl_pcomm[MAXCOMLEN+1]; /* keep 8 byte aligned */ | ||||
} __packed; | } __packed; | ||||
struct pmclog_procexec { | struct pmclog_procexec { | ||||
PMCLOG_ENTRY_HEADER | PMCLOG_ENTRY_HEADER | ||||
uint32_t pl_pid; | uint32_t pl_pid; | ||||
uint32_t pl_pmcid; | uint32_t pl_pmcid; | ||||
uintfptr_t pl_start; /* keep 8 byte aligned */ | /* keep 8 byte aligned */ | ||||
uintptr_t pl_base; /* AT_BASE */ | |||||
/* keep 8 byte aligned */ | |||||
uintptr_t pl_dyn; /* PIE load base */ | |||||
char pl_pathname[PATH_MAX]; | char pl_pathname[PATH_MAX]; | ||||
} __packed; | } __packed; | ||||
struct pmclog_procexit { | struct pmclog_procexit { | ||||
PMCLOG_ENTRY_HEADER | PMCLOG_ENTRY_HEADER | ||||
uint32_t pl_pmcid; | uint32_t pl_pmcid; | ||||
uint32_t pl_pid; | uint32_t pl_pid; | ||||
uint64_t pl_value; /* keep 8 byte aligned */ | uint64_t pl_value; /* keep 8 byte aligned */ | ||||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | |||||
void pmclog_process_map_out(struct pmc_owner *po, pid_t pid, | void pmclog_process_map_out(struct pmc_owner *po, pid_t pid, | ||||
uintfptr_t start, uintfptr_t end); | uintfptr_t start, uintfptr_t end); | ||||
void pmclog_process_pmcallocate(struct pmc *_pm); | void pmclog_process_pmcallocate(struct pmc *_pm); | ||||
void pmclog_process_pmcattach(struct pmc *_pm, pid_t _pid, char *_path); | void pmclog_process_pmcattach(struct pmc *_pm, pid_t _pid, char *_path); | ||||
void pmclog_process_pmcdetach(struct pmc *_pm, pid_t _pid); | void pmclog_process_pmcdetach(struct pmc *_pm, pid_t _pid); | ||||
void pmclog_process_proccsw(struct pmc *_pm, struct pmc_process *_pp, | void pmclog_process_proccsw(struct pmc *_pm, struct pmc_process *_pp, | ||||
pmc_value_t _v, struct thread *); | pmc_value_t _v, struct thread *); | ||||
void pmclog_process_procexec(struct pmc_owner *_po, pmc_id_t _pmid, pid_t _pid, | void pmclog_process_procexec(struct pmc_owner *_po, pmc_id_t _pmid, pid_t _pid, | ||||
uintfptr_t _startaddr, char *_path); | uintfptr_t _baseaddr, uintptr_t _dynaddr, char *_path); | ||||
void pmclog_process_procexit(struct pmc *_pm, struct pmc_process *_pp); | void pmclog_process_procexit(struct pmc *_pm, struct pmc_process *_pp); | ||||
void pmclog_process_procfork(struct pmc_owner *_po, pid_t _oldpid, pid_t _newpid); | void pmclog_process_procfork(struct pmc_owner *_po, pid_t _oldpid, pid_t _newpid); | ||||
void pmclog_process_sysexit(struct pmc_owner *_po, pid_t _pid); | void pmclog_process_sysexit(struct pmc_owner *_po, pid_t _pid); | ||||
void pmclog_process_threadcreate(struct pmc_owner *_po, struct thread *td, int sync); | void pmclog_process_threadcreate(struct pmc_owner *_po, struct thread *td, int sync); | ||||
void pmclog_process_threadexit(struct pmc_owner *_po, struct thread *td); | void pmclog_process_threadexit(struct pmc_owner *_po, struct thread *td); | ||||
void pmclog_process_proccreate(struct pmc_owner *_po, struct proc *p, int sync); | void pmclog_process_proccreate(struct pmc_owner *_po, struct proc *p, int sync); | ||||
int pmclog_process_userlog(struct pmc_owner *_po, | int pmclog_process_userlog(struct pmc_owner *_po, | ||||
struct pmc_op_writelog *_wl); | struct pmc_op_writelog *_wl); | ||||
void pmclog_shutdown(void); | void pmclog_shutdown(void); | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* _SYS_PMCLOG_H_ */ | #endif /* _SYS_PMCLOG_H_ */ |
Given the other comments in this block, it might make sense to allocate a new number for the new procexec type even if the code only handles the new format. You could call the old one PMCLOG_TYPE_PROCEXEC_FBSD13 (for value 9) and add the new one here? That is a small change that doesn't disrupt the other parts of the patch and seems more consistent with the past track record here which adds new types when changing the ABI of a message.