Date: Sat, 8 Dec 2007 00:25:26 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 130444 for review Message-ID: <200712080025.lB80PQfJ068908@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=130444 Change 130444 by jb@jb_freebsd1 on 2007/12/08 00:24:54 Save some WIP. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_cddl.h#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_cddl.h#2 (text+ko) ==== @@ -25,10 +25,22 @@ #ifndef _DTRACE_CDDL_H_ #define _DTRACE_CDDL_H_ +#include <sys/proc.h> + +/* + * Kernel DTrace extension to 'struct proc' for FreeBSD. + */ +typedef struct kdtrace_proc { + int p_dtrace_probes; /* Are there probes for this proc? */ + u_int64_t p_dtrace_count; /* Number of DTrace tracepoints */ + void *p_dtrace_helpers; /* DTrace helpers, if any */ + +} kdtrace_proc_t; + /* * Kernel DTrace extension to 'struct thread' for FreeBSD. */ -struct kdtrace_thread { +typedef struct kdtrace_thread { u_int8_t td_dtrace_stop; /* Indicates a DTrace-desired stop */ u_int8_t td_dtrace_sig; /* Signal sent via DTrace's raise() */ u_int td_predcache; /* DTrace predicate cache */ @@ -62,6 +74,30 @@ /* DTrace return sequence location. */ u_int64_t td_hrtime; /* Last time on cpu. */ int td_errno; /* Syscall return value. */ -}; +} kdtrace_thread_t; + +/* + * Definitions to reference fields in the FreeBSD DTrace structures defined + * above using the names of fields in similar structures in Solaris. Note + * that the separation on FreeBSD is a licensing constraint designed to + * keep the GENERIC kernel BSD licensed. + */ +#define t_dtrace_vtime td_dtrace->td_dtrace_vtime +#define t_dtrace_start td_dtrace->td_dtrace_start +#define t_dtrace_stop td_dtrace->td_dtrace_stop +#define t_dtrace_sig td_dtrace->td_dtrace_sig +#define t_predcache td_dtrace->td_predcache +#define p_dtrace_helpers p_dtrace->p_dtrace_helpers + +/* + * Definitions for fields in struct proc which are named differntly in FreeBSD. + */ +#define p_cred p_ucred + +/* + * Definitions for fields in struct thread which are named differntly in FreeBSD. + */ +#define t_procp td_proc +#define t_tid td_tid #endif /* !_DTRACE_CDDL_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712080025.lB80PQfJ068908>