From b684263996bac87616c81145b204e1e34cd88dea Mon Sep 17 00:00:00 2001 From: delphij Date: Fri, 22 Aug 2014 20:04:51 +0000 Subject: Make DTrace stuff compile with C99 standard. --- cddl/lib/libdtrace/libproc_compat.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cddl/lib') diff --git a/cddl/lib/libdtrace/libproc_compat.h b/cddl/lib/libdtrace/libproc_compat.h index 7e54ada..8443336 100644 --- a/cddl/lib/libdtrace/libproc_compat.h +++ b/cddl/lib/libdtrace/libproc_compat.h @@ -43,6 +43,7 @@ #define Pcreate_error strerror #define Pdelbkpt proc_bkptdel #define Pgrab_error strerror +#define Plmid(p, a, l) (-1) #define Plmid_to_map(p, l, o) proc_obj2map((p), (o)) #define Plookup_by_addr proc_addr2sym #define Pname_to_ctf(p, obj) NULL -- cgit v1.1 From 2a1bf3161bcde0d19f55d20f60591584023f628e Mon Sep 17 00:00:00 2001 From: delphij Date: Fri, 26 Sep 2014 21:46:32 +0000 Subject: Add libuutil to dependency list. Noticed by: sef MFC after: 3 days --- cddl/lib/libzfs/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cddl/lib') diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index 4010ac1..6937806 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -7,8 +7,8 @@ LIB= zfs DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} ${LIBNVPAIR} \ - ${LIBAVL} ${LIBZFS_CORE} -LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -lavl -lzfs_core + ${LIBUUTIL} ${LIBAVL} ${LIBZFS_CORE} +LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -luutil -lavl -lzfs_core SRCS= deviceid.c \ fsshare.c \ -- cgit v1.1 From 60288efc68ed411c5fe62ca7161ad3f5dafa3b84 Mon Sep 17 00:00:00 2001 From: delphij Date: Sat, 27 Sep 2014 09:39:19 +0000 Subject: Revert r272189, the committed version was an old version and breaks build. Pointy hat to: delphij --- cddl/lib/libzfs/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cddl/lib') diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index 6937806..4010ac1 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -7,8 +7,8 @@ LIB= zfs DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} ${LIBNVPAIR} \ - ${LIBUUTIL} ${LIBAVL} ${LIBZFS_CORE} -LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -luutil -lavl -lzfs_core + ${LIBAVL} ${LIBZFS_CORE} +LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -lavl -lzfs_core SRCS= deviceid.c \ fsshare.c \ -- cgit v1.1 From 5a6c8bb01b9c63a9f82583cd78595b13cc20d4d6 Mon Sep 17 00:00:00 2001 From: delphij Date: Fri, 3 Oct 2014 20:36:09 +0000 Subject: Add dependencies to various libraries to libzfs and libzpool. Submitted by: sef --- cddl/lib/libzfs/Makefile | 7 +++++-- cddl/lib/libzpool/Makefile | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'cddl/lib') diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index 4010ac1..b2f4352 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -7,8 +7,11 @@ LIB= zfs DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} ${LIBNVPAIR} \ - ${LIBAVL} ${LIBZFS_CORE} -LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -lavl -lzfs_core + ${LIBAVL} ${LIBZFS_CORE} ${LIBUUTIL} ${LIBBSDXML} ${LIBGEOM} \ + ${LIBNVPAIR} + +LDADD= -lmd -lpthread -lumem -lutil -luutil -lm -lnvpair -lavl \ + -lbsdxml -lgeom -lnvpair -lzfs_core SRCS= deviceid.c \ fsshare.c \ diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile index 8f60a20..b80af04 100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@ -56,8 +56,9 @@ CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/thread CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/sys CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include -DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBZ} -LDADD= -lmd -lpthread -lz +DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBZ} ${LIBNVPAIR} \ + ${LIBAVL} ${LIBUMEM} +LDADD= -lmd -lpthread -lz -lnvpair -lavl -lumem # atomic.S doesn't like profiling. MK_PROFILE= no -- cgit v1.1 From 91d5d12d67db05be29b36096bcb90e39e1541fae Mon Sep 17 00:00:00 2001 From: markj Date: Fri, 3 Oct 2014 23:20:37 +0000 Subject: Hook up support for userland CTF support in DTrace. This required some modifications to libproc to support fetching the CTF info for a given file. With this change, dtrace(1) is able to resolve type info for function and USDT probe arguments, and function return values. In particular, the args[n] syntax should now work for referencing arguments of userland probes, provided that the requisite CTF info is available. The uctf tests pass if the test programs are compiled with CTF info. The current infrastructure around the DTrace test suite doesn't support this yet. Differential Revision: https://reviews.freebsd.org/D891 MFC after: 1 month Relnotes: yes Sponsored by: EMC / Isilon Storage Division --- cddl/lib/libdtrace/libproc_compat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cddl/lib') diff --git a/cddl/lib/libdtrace/libproc_compat.h b/cddl/lib/libdtrace/libproc_compat.h index 8443336..0d99d96 100644 --- a/cddl/lib/libdtrace/libproc_compat.h +++ b/cddl/lib/libdtrace/libproc_compat.h @@ -38,7 +38,7 @@ #define Pxlookup_by_addr(p, a, n, s, sym, i) \ proc_addr2sym(p, a, n, s, sym) #define Pxlookup_by_name(p, l, s1, s2, sym, a) \ - proc_name2sym((p), (s1), (s2), (sym)) + proc_name2sym(p, s1, s2, sym, a) #define Paddr_to_map proc_addr2map #define Pcreate_error strerror #define Pdelbkpt proc_bkptdel @@ -46,10 +46,10 @@ #define Plmid(p, a, l) (-1) #define Plmid_to_map(p, l, o) proc_obj2map((p), (o)) #define Plookup_by_addr proc_addr2sym -#define Pname_to_ctf(p, obj) NULL +#define Pname_to_ctf(p, obj) (ctf_file_t *)proc_name2ctf(p, obj) #define Pname_to_map proc_name2map #define Pobject_iter proc_iter_objs -#define Pobject_iter_resolved(p, f, arg) 1 +#define Pobject_iter_resolved(p, f, arg) proc_iter_objs(p, f, arg) #define Pobjname proc_objname #define Pread proc_read #define Prd_agent proc_rdagent -- cgit v1.1 From 0a28893572e896d12d1f833c89bf1dc0fcd64a47 Mon Sep 17 00:00:00 2001 From: gnn Date: Sun, 19 Oct 2014 23:13:16 +0000 Subject: Update the TCP structure used by DTrace to show the smoothed RTT. This will allow similar functionality to SIFTR to be built with DTrace. Submitted by: Grenville Armitage MFC after: 2 weeks --- cddl/lib/libdtrace/tcp.d | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cddl/lib') diff --git a/cddl/lib/libdtrace/tcp.d b/cddl/lib/libdtrace/tcp.d index 7695e22..bf687a2 100644 --- a/cddl/lib/libdtrace/tcp.d +++ b/cddl/lib/libdtrace/tcp.d @@ -116,6 +116,7 @@ typedef struct tcpsinfo { uint32_t tcps_rto; /* round-trip timeout, msec */ uint32_t tcps_mss; /* max segment size */ int tcps_retransmit; /* retransmit send event, boolean */ + int tcps_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */ } tcpsinfo_t; /* @@ -200,6 +201,7 @@ translator tcpsinfo_t < struct tcpcb *p > { tcps_rto = p == NULL ? -1 : p->t_rxtcur / 1000; /* XXX */ tcps_mss = p == NULL ? -1 : p->t_maxseg; tcps_retransmit = p == NULL ? -1 : p->t_rxtshift > 0 ? 1 : 0; + tcps_srtt = p == NULL ? -1 : p->t_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */ }; #pragma D binding "1.6.3" translator -- cgit v1.1 From 78d7824866f39c18fed915795deed451f98af260 Mon Sep 17 00:00:00 2001 From: markj Date: Tue, 21 Oct 2014 05:19:08 +0000 Subject: Correct the calculation of tcps_rto in the struct tcpcb -> tcpsinfo_t translator. Submitted by: Grenville Armitage MFC after: 1 week --- cddl/lib/libdtrace/tcp.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cddl/lib') diff --git a/cddl/lib/libdtrace/tcp.d b/cddl/lib/libdtrace/tcp.d index bf687a2..4b826f1 100644 --- a/cddl/lib/libdtrace/tcp.d +++ b/cddl/lib/libdtrace/tcp.d @@ -198,7 +198,7 @@ translator tcpsinfo_t < struct tcpcb *p > { tcps_cwnd_ssthresh = p == NULL ? -1 : p->snd_ssthresh; tcps_sack_fack = p == NULL ? 0 : p->snd_fack; tcps_sack_snxt = p == NULL ? 0 : p->sack_newdata; - tcps_rto = p == NULL ? -1 : p->t_rxtcur / 1000; /* XXX */ + tcps_rto = p == NULL ? -1 : (p->t_rxtcur * 1000) / `hz; tcps_mss = p == NULL ? -1 : p->t_maxseg; tcps_retransmit = p == NULL ? -1 : p->t_rxtshift > 0 ? 1 : 0; tcps_srtt = p == NULL ? -1 : p->t_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */ -- cgit v1.1