Skip to content
Commit 047c289b authored by Valentin Schneider's avatar Valentin Schneider
Browse files

DEBUG: irqchip: Add an IRQ prod



TODO: align DT and ACPI faff

This can be used with a script like so, which yields one file per
iteration (counting IRQ counts) in the current directory.

  get_irq_count () {
      cat /proc/interrupts | grep irq-prod | awk '{ print $2; }'
  }

  for f in $(find /sys/devices/system/cpu/cpufreq/ -name "policy*"); do
      echo "performance" > "$f"/scaling_governor
  done

  KTHREAD_PID=$(ps -aux | grep irq-prod/ | head -n 1 | awk '{ print $2; }')
  taskset -pc 0 $KTHREAD_PID

  for ((i=0; i < 20; i++)); do
      base_val=$(get_irq_count)

      now=$(date +%s%3N)
      echo 1 > /sys/kernel/irq_prod/active
      sleep 5
      echo 0 > /sys/kernel/irq_prod/active
      end=$(date +%s%3N)

      end_val=$(get_irq_count)
      delta=$((end_val - base_val))
      duration=$((end - now))

      echo $((delta / (duration / 1000))) > ./$i
  done

Signed-off-by: default avatarValentin Schneider <valentin.schneider@arm.com>
parent 3b4a4278
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment