Clean up profiler configure and usage functions.
authorDan Cross <crossd@gmail.com>
Tue, 8 Mar 2016 16:54:42 +0000 (11:54 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 8 Mar 2016 19:58:19 +0000 (14:58 -0500)
commit5bff0d50293dcc582cf99a0110853c453fc3e688
tree5216ab7a91e3c90ef9af286465471e1492016ee3
parentee923feea435e5de6ccb188c385c16bf22b1e635
Clean up profiler configure and usage functions.

An incidental cleanup that became evident from the last cleanup;
the 'profiler_configure' function was unnecessarily hard to
follow due to lack of an early return.

Also, there was this odd function to return an array of strings
that could be used to construct an error message, but that were
used nowhere else; this was an encapsulation failure.  Change
that to just construct the error message and call it.

Arguably, the configure function should just call 'error()'. Oh
well.

Signed-off-by: Dan Cross <crossd@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/dev/kprof.c
kern/include/profiler.h
kern/src/profiler.c