Commit Graph

321 Commits

Author SHA1 Message Date
christos
6d7ab7eb57 constify 2015-03-07 15:14:29 +00:00
christos
c0342a4ea1 - cleanup FreeBSD ifdefs
- remove unused code
- adjust to NetBSD struct emul and types.
2015-03-07 15:14:09 +00:00
christos
56bb5331f6 XXX: Use only a single thread. We seem to have a bug in our threading code
that causes us to hang in the ksem code if we use more than one.
2015-03-06 11:49:30 +00:00
ozaki-r
45c3185cfc Fix inconsistency between module and internal names of sdt and fbt
PR 49697
OK wiz@
2015-02-26 10:31:52 +00:00
ozaki-r
9ce3434ff9 Fix module unload of dtrace, sdt and fbt
- Don't unload when there are users of dtrace
- Forbid auto unloading (not supported for now)

PR 49695
2015-02-26 09:10:52 +00:00
ozaki-r
2be0e59f43 Fix dtrace build for arm with gcc 4.8 2015-02-21 15:13:20 +00:00
ozaki-r
3bcb5a6ccb Fix dtrace build error with gcc 4.8 on i386 and arm
_ILP32 is required by dt_popc.

The fix is inspired by FreeBSD.
2015-02-21 15:00:30 +00:00
ozaki-r
47d3523379 Add assert 2015-02-18 03:08:38 +00:00
ozaki-r
99f05559ed Don't return success when the target CPU is offline
dt_status originally expected the behavior.

This fixes a segfault happens in dt_aggregate_go (a user of dt_status)
that depends on the behavior.
2015-02-18 03:07:56 +00:00
christos
bf418d8f39 PR/49667: Henning Petersen: Missing initialization of values in dt_parser.c 2015-02-14 15:55:05 +00:00
christos
92111d5005 PR/49666: Henning Petersen: initialization of instr wrong in dt_cg.c NULL
instead of 0 for uint32_t.
2015-02-14 15:53:23 +00:00
christos
92e3cdde4e delete error(1) strings. 2015-02-07 20:33:22 +00:00
christos
b8c591ba5d check and fix printf formats, negative array indices, uninitialized variables,
shadowed variables.
2015-02-07 20:30:03 +00:00
wiz
659c05d388 Comment out currently unused dtrace_dof_char function (for clang build). 2015-01-31 13:36:29 +00:00
hannken
aaf5c384d9 Change zfs to vcache.
- zfs_loadvnode() is based on zfs_zget() plus zfs_znode_alloc().
2014-12-05 09:13:32 +00:00
hannken
f43b9b375a Remove vnode creation from zfs_create_fs() and zfs_create_share_dir()
as a vnode is not needed here.

Inspired by FreeBSD r253603.
2014-12-05 09:12:29 +00:00
christos
be13e1550a don't fail for anonymous unions. 2014-11-01 23:21:31 +00:00
justin
3cf1fc0878 Add libraries in order that they will link if static as well as dynamic 2014-10-30 21:15:13 +00:00
joerg
18fd8dcd8d SPEC_MAXOFFSET_T doesn't exist anywhere else, so don't use it here
either.
2014-07-28 10:01:23 +00:00
ryoon
4575a9c0a5 Fix dtrace kernel module build.
Add nodiscard to cdevsw.
They are not fixed in fallocate/fdiscard changes.
2014-07-26 04:54:20 +00:00
christos
02cb0c6eaf Introduce a selector function to the vfs vnode iterator so that we don't
need to vget() vnodes that we are not interested at, and optimize locking
a bit. Iterator changes reviewed by Hannken (thanks), the rest of the bugs
are mine.
2014-05-24 16:34:03 +00:00
christos
7081cf9a59 need bsd.own.mk 2014-04-28 21:56:20 +00:00
christos
0b24109d1b make compilable from the kernel 2014-04-22 15:12:35 +00:00
christos
c8ad22d607 Add fake atomic 64 ops for those who don't have them.
XXX: used to be arm, now it is also i386.
2014-04-22 15:02:38 +00:00
maxv
23f76b6d00 An (un)privileged user can easily make the kernel dereference a NULL
pointer.

The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).

ok christos@
2014-04-16 18:55:17 +00:00
riastradh
418e8d3033 Don't forget ZFS_EXIT after ZFS_ENTER. 2014-04-09 22:41:38 +00:00
riastradh
c83470498f Try vflush, which may fail, before we mark the file system mounted. 2014-04-09 22:40:32 +00:00
christos
897d836e1d Handle assembly code built with -g 2014-04-05 23:33:15 +00:00
ozaki-r
b7c3845c47 Complete migrating to snprintf_blkptr 2014-03-28 03:46:56 +00:00
ozaki-r
c5002aae34 Fix migrating to snprintf_blkptr 2014-03-28 03:18:24 +00:00
ozaki-r
2821606826 Add missing 4th argument of ddt_object_name 2014-03-28 03:11:00 +00:00
ozaki-r
4e2e658100 Fix some snprintf 2014-03-28 02:58:36 +00:00
ozaki-r
bc3ce11eda Add missing 3rd argument of nicenum 2014-03-28 02:50:18 +00:00
apb
6713b766dd format is a pointer, so sizeof(format) is not a good length
to pass to snprintf.  Try to calculate the correct length,
taking into account the amount of space already used.
2014-03-27 19:34:39 +00:00
christos
a2d437b386 kill sprintf 2014-03-27 15:50:48 +00:00
ozaki-r
1339b2cc13 Add MKCTF
This variable separates CTF stuffs from MKDTRACE; we can build DTrace
solely without building and using them. This allows us to use DTrace
even if CTF stuffs have problems (actually they have now).

This variable would be merged into MKDTRACE eventually, once CTF stuffs
work correctly again.
2014-03-25 09:52:55 +00:00
ozaki-r
4ae43925ec Exclude mvsoctmr_* functions from FBT targets
Probing them doesn't work for DTrace/arm for some reason.

Anyway with this fix, DTrace/arm works on SHEEVAPLUG
as well as BEAGLEBONE.
2014-03-19 11:14:12 +00:00
hannken
33b1d7765e Change zfs_sync() to use vfs_vnode_iterator. 2014-03-17 09:37:41 +00:00
ozaki-r
e2fc5c59a0 Use MACHINE_CPU instead of MACHINE_ARCH with pattern matching
Include bsd.own.mk to use MACHINE_CPU.

Advised by matt@
2014-03-16 06:51:43 +00:00
ozaki-r
f27e224fab Look up arm directory on MACHINE_ARCH=*arm* 2014-03-16 05:11:19 +00:00
ozaki-r
609ba481a5 Implement DTrace FBT provider for ARM
- Finding probable functions
- Replacing instructions
- Emulating instructions

It is tested only on ARMv7 CPUs yet, for example,
-m evbarm (-a earm) kernel=BEAGLEBONE.
2014-03-15 08:00:19 +00:00
ozaki-r
48e9045322 Enable invop handler on module load
It sets a fbt handler to dtrace_invop_jump_addr on module load,
which is used to call the dtrace probing function from the trap
handler.
2014-03-15 07:49:15 +00:00
ozaki-r
26e6962bfe Make arm/dtrace_isa.c buildable
This is a band-aid for build, but it works anyway.
We have to do a real fix in the future.
2014-03-15 07:43:01 +00:00
ozaki-r
18c3aa4966 Fix header inclusions 2014-03-10 06:38:22 +00:00
ozaki-r
7ea504b141 Make arm/dtrace_subr.c buildable
The change just imports the code from
http://people.freebsd.org/~gonzo/arm/dtrace-arm.diff
and tweaks for NetBSD.
2014-03-10 03:04:57 +00:00
christos
60a5bae159 Tidy up paths. 2014-03-09 22:01:31 +00:00
christos
0afc3eb7f2 put back our local fixes:
- don't die on unresolved types.
- it is ok to have 0 sized arrays in structs
- forward enum decls.
2014-03-09 20:48:01 +00:00
christos
cf96d463d6 Temporarily add a -S flag to limit the number of threads. 2014-03-09 19:14:15 +00:00
christos
e3afac50d3 fix constant name 2014-03-09 17:07:46 +00:00
christos
7016e57516 use merged ctf rules 2014-03-09 17:05:23 +00:00