Revision e323c93e

b/scripts/tracetool
30 30
  --stap Generate .stp file (DTrace with SystemTAP only)
31 31

  
32 32
Options:
33
  --binary      [path]  Full path to QEMU binary
34
  --target-arch [arch]  QEMU emulator target arch
35
  --target-type [type]  QEMU emulator target type ('system' or 'user')
33
  --binary       [path]    Full path to QEMU binary
34
  --target-arch  [arch]    QEMU emulator target arch
35
  --target-type  [type]    QEMU emulator target type ('system' or 'user')
36
  --probe-prefix [prefix]  Prefix for dtrace probe names
37
                           (default: qemu-\$targettype-\$targetarch)
36 38

  
37 39
EOF
38 40
    exit 1
......
472 474

  
473 475
    # Define prototype for probe arguments
474 476
    cat <<EOF
475
probe qemu.$targettype.$targetarch.$name = process("$binary").mark("$name")
477
probe $probeprefix.$name = process("$binary").mark("$name")
476 478
{
477 479
EOF
478 480

  
......
574 576
       echo "--binary is required for SystemTAP tapset generator"
575 577
       exit 1
576 578
    fi
577
    if [ -z "$targettype" ]; then
579
    if [ -z "$probeprefix" -a -z "$targettype" ]; then
578 580
       echo "--target-type is required for SystemTAP tapset generator"
579 581
       exit 1
580 582
    fi
581
    if [ -z "$targetarch" ]; then
583
    if [ -z "$probeprefix" -a -z "$targetarch" ]; then
582 584
       echo "--target-arch is required for SystemTAP tapset generator"
583 585
       exit 1
584 586
    fi
587
    if [ -z "$probeprefix" ]; then
588
	probeprefix="qemu.$targettype.$targetarch";
589
    fi
585 590
    echo "/* This file is autogenerated by tracetool, do not edit. */"
586 591
    convert stap
587 592
}
......
592 597
binary=
593 598
targettype=
594 599
targetarch=
600
probeprefix=
595 601

  
596 602

  
597 603
until [ -z "$1" ]
......
602 608
    "--binary") shift ; binary="$1" ;;
603 609
    "--target-arch") shift ; targetarch="$1" ;;
604 610
    "--target-type") shift ; targettype="$1" ;;
611
    "--probe-prefix") shift ; probeprefix="$1" ;;
605 612

  
606 613
    "-h" | "-c" | "-d") output="${1#-}" ;;
607 614
    "--stap") output="${1#--}" ;;

Also available in: Unified diff