Print this page
4474 DTrace Userland CTF Support
4475 DTrace userland Keyword
4476 DTrace tests should be better citizens
4479 pid provider types
4480 dof emulation missing checks
Reviewed by: Bryan Cantrill <bryan@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/dtrace/dtrace.c
          +++ new/usr/src/cmd/dtrace/dtrace.c
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  /*
  27   27   * Copyright (c) 2012 by Delphix. All rights reserved.
       28 + * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  28   29   */
  29   30  
  30   31  #include <sys/types.h>
  31   32  #include <sys/stat.h>
  32   33  #include <sys/wait.h>
  33   34  
  34   35  #include <dtrace.h>
  35   36  #include <stdlib.h>
  36   37  #include <stdarg.h>
  37   38  #include <stdio.h>
↓ open down ↓ 443 lines elided ↑ open up ↑
 481  482          if (fclose(g_ofp) == EOF)
 482  483                  fatal("failed to close output file '%s'", g_ofile);
 483  484  
 484  485          error("added forceload directives to %s\n", g_ofile);
 485  486  }
 486  487  
 487  488  static void
 488  489  print_probe_info(const dtrace_probeinfo_t *p)
 489  490  {
 490  491          char buf[BUFSIZ];
      492 +        char *user;
 491  493          int i;
 492  494  
 493  495          oprintf("\n\tProbe Description Attributes\n");
 494  496  
 495  497          oprintf("\t\tIdentifier Names: %s\n",
 496  498              dtrace_stability_name(p->dtp_attr.dtat_name));
 497  499          oprintf("\t\tData Semantics:   %s\n",
 498  500              dtrace_stability_name(p->dtp_attr.dtat_data));
 499  501          oprintf("\t\tDependency Class: %s\n",
 500  502              dtrace_class_name(p->dtp_attr.dtat_class));
↓ open down ↓ 3 lines elided ↑ open up ↑
 504  506          oprintf("\t\tIdentifier Names: %s\n",
 505  507              dtrace_stability_name(p->dtp_arga.dtat_name));
 506  508          oprintf("\t\tData Semantics:   %s\n",
 507  509              dtrace_stability_name(p->dtp_arga.dtat_data));
 508  510          oprintf("\t\tDependency Class: %s\n",
 509  511              dtrace_class_name(p->dtp_arga.dtat_class));
 510  512  
 511  513          oprintf("\n\tArgument Types\n");
 512  514  
 513  515          for (i = 0; i < p->dtp_argc; i++) {
      516 +                if (p->dtp_argv[i].dtt_flags & DTT_FL_USER)
      517 +                        user = "userland ";
      518 +                else
      519 +                        user = "";
 514  520                  if (ctf_type_name(p->dtp_argv[i].dtt_ctfp,
 515  521                      p->dtp_argv[i].dtt_type, buf, sizeof (buf)) == NULL)
 516  522                          (void) strlcpy(buf, "(unknown)", sizeof (buf));
 517      -                oprintf("\t\targs[%d]: %s\n", i, buf);
      523 +                oprintf("\t\targs[%d]: %s%s\n", i, user, buf);
 518  524          }
 519  525  
 520  526          if (p->dtp_argc == 0)
 521  527                  oprintf("\t\tNone\n");
 522  528  
 523  529          oprintf("\n");
 524  530  }
 525  531  
 526  532  /*ARGSUSED*/
 527  533  static int
↓ open down ↓ 1313 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX