Andrea Cucciarre'' - Sun Microsystems - Italy
2008-Sep-26 07:45 UTC
kernel function rl_log_control is not matched by any probe
Hello,
I need to trace the kernel function "rl_log_control" which is defined
in /usr/src/cmd/fs.d/ufs/roll_log/roll_log.c however dtrace can''t find
that probe
bash-3.00# dtrace -l -n ::rl_log_control:
ID PROVIDER MODULE FUNCTION
NAME
dtrace: failed to match ::rl_log_control:: No probe matches description
Do you have any suggest?
433 rl_result_t
434 rl_log_control(char *bdev, int request)
435 {
436 log_info_t li;
437 rl_result_t rv = RL_SUCCESS;
438 rl_result_t alreadymounted;
439 int fd;
440 fiolog_t fl;
441 int logenabled;
442
443 if ((request != _FIOLOGENABLE) && (request
!_FIOLOGDISABLE))
444 return (RL_FAIL);
445
446 (void) memset((void *)&li, ''\0'',
(size_t)sizeof (li));
447 if ((alreadymounted = is_mounted(&li, bdev)) !RL_TRUE) {
448 /*
449 * Device is not mounted. Need to mount it rw to
allow
450 * the log to be enabled/disabled. To do the
mount, we need
451 * to create a temporary directory, and then
remove it when
452 * we are done.
453 */
454 if (make_mp(&li) != RL_SUCCESS) {
455 cleanup(&li);
456 return (RL_FAIL);
457 }
458 if (rlmount(&li, RLM_RW) != RL_SUCCESS) {
459 cleanup(&li);
460 return (RL_FAIL);
461 }
462 }
463
464 if (alreadymounted == RL_TRUE)
465 fd = open(li.li_mntpoint, O_RDONLY);
466 else
467 fd = open(li.li_tmpmp, O_RDONLY);
468 if (fd == SYSERR) {
469 perror("open");
470 rv = RL_SYSERR;
471 goto out;
472 }
473
474 fl.nbytes_requested = 0;
475 fl.nbytes_actual = 0;
476 fl.error = FIOLOG_ENONE;
477
478 if (ioctl(fd, request, &fl) == SYSERR) {
479 perror("ioctl");
480 (void) close(fd);
481 rv = RL_SYSERR;
482 goto out;
483 }
484 if (ioctl(fd, _FIOISLOG, &logenabled) == SYSERR) {
485 perror("ioctl");
486 (void) close(fd);
487 rv = RL_SYSERR;
488 goto out;
489 }
490 if (((request == _FIOLOGENABLE) && (!logenabled))
||
491 ((request == _FIOLOGDISABLE) && logenabled))
492 rv = RL_FAIL;
493
494 (void) close(fd);
495 out:
496 if (alreadymounted != RL_TRUE)
497 (void) rlumount(&li);
498 cleanup(&li);
499 return (rv);
500 }
--
Andrea Cucciarre''
Storage Engineer
Sun Microsystems Italia S.p.A.
Viale Fulvio Testi, 327
20162 Milano, Italy
Phone +39 800605338
Fax +39 0264152204
E-m@il andrea.cucciarre-UdXhSnd/wVw@public.gmane.org
Allan Black
2008-Sep-26 11:28 UTC
[dtrace-discuss] kernel function rl_log_control is not matched by any probe
Andrea Cucciarre'' - Sun Microsystems - Italy wrote:> I need to trace the kernel function "rl_log_control" which is defined in > /usr/src/cmd/fs.d/ufs/roll_log/roll_log.c however dtrace can''t find that proberl_log_control is not a kernel function - it is a utility function which is included in programs like fsck. If you want to trace this, you will need to use the pid provider, and also the process you want to trace must be currently running. If so, try e.g. # dtrace -l -n ''pid<PID>:a.out:rl_log_control:entry'' Allan