Thanks for the build Andy.
With all my normal parameters and 3 IMUs enabled…
The headline act seems to be Copter::read_AHRS TOT=58.8%
With Copter::update_flight_mode
using up a bit more time than I expected
I can easily run tests, but I’m not set up to compile the firmware myself.
ThreadsV2
ISR PRI=255 sp=0x20020000 STACK=1276/1536 LOAD= 2.0%
ArduCopter PRI=182 sp=0x20020600 STACK=3976/7168 LOAD=39.9%
idle PRI= 1 sp=0x2003F590 STACK= 296/ 504 LOAD= 9.6%
UART_RX PRI= 60 sp=0x2007CF98 STACK= 864/1208 LOAD= 0.6%
OTG1 PRI= 60 sp=0x2007C030 STACK= 344/ 760 LOAD= 0.1%
monitor PRI=183 sp=0x2003BA38 STACK=1112/1464 LOAD= 0.3%
timer PRI=181 sp=0x2003D078 STACK=1544/1976 LOAD= 1.1%
rcout PRI=181 sp=0x2003C658 STACK= 568/ 952 LOAD= 5.2%
rcin PRI=177 sp=0x2003C048 STACK=1080/1464 LOAD= 0.3%
io PRI= 58 sp=0x2003B028 STACK=1624/2488 LOAD= 0.3%*
storage PRI= 59 sp=0x2003CA68 STACK= 944/1464 LOAD= 0.1%
UART2 PRI= 60 sp=0x2007B088 STACK= 488/ 760 LOAD= 0.1%
UART3 PRI= 60 sp=0x2007A520 STACK= 344/ 760 LOAD= 0.2%
UART1 PRI= 60 sp=0x200799B8 STACK= 352/ 760 LOAD= 0.1%
UART4 PRI= 60 sp=0x20078E50 STACK= 488/ 760 LOAD= 0.1%
MSP PRI= 59 sp=0x20078288 STACK= 976/1464 LOAD= 0.2%
SPI4 PRI=181 sp=0x20076E40 STACK= 952/1464 LOAD= 0.3%
OSD PRI= 59 sp=0x200763A8 STACK=1304/1720 LOAD= 0.1%
log_io PRI= 59 sp=0x20061728 STACK=1080/2016 LOAD= 0.1%
I2C0 PRI=176 sp=0x2005F868 STACK= 968/1464 LOAD= 0.2%
SPI1 PRI=181 sp=0x2005E9C8 STACK= 768/1464 LOAD=38.2%
Scripting PRI= 2 sp=0x200589F8 STACK=15296/17848 LOAD= 0.1%
FTP PRI= 58 sp=0x2004A3F0 STACK=1040/3000 LOAD= 0.2%
TasksV2
AP_InertialSensor::update* MIN= 30 MAX= 276 AVG= 45 OVR= 0 SLP= 0, TOT= 2.1%
Copter::run_rate_controller* MIN= 21 MAX= 252 AVG= 30 OVR= 0 SLP= 0, TOT= 1.4%
Copter::motors_output* MIN= 67 MAX= 485 AVG= 137 OVR= 0 SLP= 0, TOT= 6.4%
Copter::read_AHRS* MIN= 464 MAX=2825 AVG=1270 OVR= 2 SLP= 0, TOT=58.8%
Copter::read_inertia* MIN= 5 MAX= 124 AVG= 12 OVR= 0 SLP= 0, TOT= 0.6%
Copter::check_ekf_reset* MIN= 3 MAX= 85 AVG= 10 OVR= 0 SLP= 0, TOT= 0.4%
Copter::update_flight_mode* MIN= 134 MAX= 595 AVG= 299 OVR= 0 SLP= 0, TOT=14.1%
Copter::update_home_from_EKF* MIN= 2 MAX= 108 AVG= 9 OVR= 0 SLP= 0, TOT= 0.4%
Copter::update_land_and_crash_de MIN= 5 MAX= 246 AVG= 22 OVR= 0 SLP= 0, TOT= 1.1%
Copter::update_rangefinder_terra MIN= 2 MAX= 112 AVG= 8 OVR= 0 SLP= 0, TOT= 0.4%
AP_Mount::update_fast* MIN= 1 MAX= 127 AVG= 3 OVR= 0 SLP= 0, TOT= 0.1%
Copter::Log_Video_Stabilisation* MIN= 1 MAX= 115 AVG= 4 OVR= 0 SLP= 0, TOT= 0.2%
AP_GyroFFT::sample_gyros* MIN= 1 MAX= 117 AVG= 3 OVR= 0 SLP= 0, TOT= 0.1%
Copter::rc_loop MIN= 6 MAX= 220 AVG= 18 OVR= 0 SLP= 0, TOT= 0.9%
Copter::throttle_loop MIN= 7 MAX= 110 AVG= 13 OVR= 1 SLP= 0, TOT= 0.1%
Copter::fence_check MIN= 3 MAX= 19 AVG= 4 OVR= 0 SLP= 0, TOT= 0.0%
AP_GPS::update MIN= 9 MAX= 178 AVG= 37 OVR= 0 SLP= 0, TOT= 0.2%
AP_OpticalFlow::update MIN= 1 MAX= 94 AVG= 4 OVR= 1 SLP= 0, TOT= 0.1%
Copter::update_batt_compass MIN= 25 MAX= 151 AVG= 78 OVR= 2 SLP= 0, TOT= 0.1%
RC_Channels::read_aux_all MIN= 7 MAX= 8 AVG= 7 OVR= 0 SLP= 0, TOT= 0.0%
Copter::arm_motors_check MIN= 1 MAX= 1 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
Copter::auto_disarm_check MIN= 2 MAX= 3 AVG= 2 OVR= 0 SLP= 0, TOT= 0.0%
Copter::auto_trim MIN= 1 MAX= 2 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
Copter::read_rangefinder MIN= 10 MAX= 154 AVG= 30 OVR= 1 SLP= 0, TOT= 0.1%
AP_Proximity::update MIN= 2 MAX= 122 AVG= 9 OVR= 6 SLP= 0, TOT= 0.2%
AP_Beacon::update MIN= 1 MAX= 122 AVG= 8 OVR= 15 SLP= 0, TOT= 0.4%
AP_Airspeed::update MIN= 1 MAX= 1 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
Copter::update_altitude MIN= 21 MAX= 264 AVG= 92 OVR= 2 SLP= 0, TOT= 0.1%
Copter::run_nav_updates MIN= 2 MAX= 21 AVG= 2 OVR= 0 SLP= 0, TOT= 0.0%
Copter::update_throttle_hover MIN= 2 MAX= 56 AVG= 3 OVR= 0 SLP= 0, TOT= 0.0%
ModeSmartRTL::save_position MIN= 3 MAX= 3 AVG= 3 OVR= 0 SLP= 0, TOT= 0.0%
AC_Sprayer::update MIN= 1 MAX= 1 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
Copter::three_hz_loop MIN= 5 MAX= 5 AVG= 5 OVR= 0 SLP= 0, TOT= 0.0%
AP_ServoRelayEvents::update_even MIN= 3 MAX= 51 AVG= 7 OVR= 0 SLP= 0, TOT= 0.0%
AP_Baro::accumulate MIN= 1 MAX= 82 AVG= 9 OVR= 0 SLP= 0, TOT= 0.1%
Copter::update_precland MIN= 1 MAX= 183 AVG= 7 OVR= 9 SLP= 0, TOT= 0.3%
Copter::loop_rate_logging MIN= 2 MAX= 118 AVG= 6 OVR= 8 SLP= 0, TOT= 0.3%
Compass::cal_update MIN= 2 MAX= 79 AVG= 4 OVR= 0 SLP= 0, TOT= 0.1%
AP_Notify::update MIN= 7 MAX= 166 AVG= 26 OVR= 0 SLP= 0, TOT= 0.1%
Copter::one_hz_loop MIN= 0 MAX= 0 AVG= 0 OVR= 0 SLP= 0, TOT= 0.0%
Copter::ekf_check MIN= 2 MAX= 3 AVG= 2 OVR= 0 SLP= 0, TOT= 0.0%
Copter::check_vibration MIN= 4 MAX= 5 AVG= 4 OVR= 0 SLP= 0, TOT= 0.0%
Copter::gpsglitch_check MIN= 2 MAX= 3 AVG= 2 OVR= 0 SLP= 0, TOT= 0.0%
Copter::takeoff_check MIN= 2 MAX= 82 AVG= 6 OVR= 1 SLP= 0, TOT= 0.0%
Copter::landinggear_update MIN= 1 MAX= 2 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
Copter::standby_update MIN= 3 MAX= 112 AVG= 7 OVR= 1 SLP= 0, TOT= 0.1%
Copter::lost_vehicle_check MIN= 5 MAX= 5 AVG= 5 OVR= 0 SLP= 0, TOT= 0.0%
GCS::update_receive MIN= 14 MAX= 255 AVG= 43 OVR= 10 SLP= 0, TOT= 2.1%
GCS::update_send MIN= 23 MAX= 457 AVG= 80 OVR= 14 SLP= 0, TOT= 3.7%
AP_Mount::update MIN= 1 MAX= 69 AVG= 4 OVR= 0 SLP= 0, TOT= 0.0%
AP_Camera::update MIN= 2 MAX= 83 AVG= 8 OVR= 1 SLP= 0, TOT= 0.1%
Copter::ten_hz_logging_loop MIN= 193 MAX= 466 AVG= 395 OVR= 5 SLP= 0, TOT= 0.5%
Copter::twentyfive_hz_logging MIN= 4 MAX= 149 AVG= 26 OVR= 1 SLP= 0, TOT= 0.1%
AP_Logger::periodic_tasks MIN= 13 MAX= 261 AVG= 43 OVR= 12 SLP= 0, TOT= 2.1%
AP_InertialSensor::periodic MIN= 1 MAX= 143 AVG= 5 OVR= 9 SLP= 0, TOT= 0.2%
AP_Scheduler::update_logging MIN= 62 MAX= 62 AVG= 62 OVR= 0 SLP= 0, TOT= 0.0%
AP_RPM::update MIN= 1 MAX= 23 AVG= 3 OVR= 0 SLP= 0, TOT= 0.0%
AP_TempCalibration::update MIN= 1 MAX= 2 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
Copter::avoidance_adsb_update MIN= 8 MAX= 54 AVG= 16 OVR= 0 SLP= 0, TOT= 0.0%
Copter::terrain_update MIN= 2 MAX= 71 AVG= 13 OVR= 0 SLP= 0, TOT= 0.0%
AP_Gripper::update MIN= 2 MAX= 3 AVG= 2 OVR= 0 SLP= 0, TOT= 0.0%
AP_Winch::update MIN= 2 MAX= 36 AVG= 5 OVR= 0 SLP= 0, TOT= 0.0%
AP_Button::update MIN= 2 MAX= 31 AVG= 11 OVR= 0 SLP= 0, TOT= 0.0%
AP_Stats::update MIN= 4 MAX= 4 AVG= 4 OVR= 0 SLP= 0, TOT= 0.0%
AP_NMEA_Output::update MIN= 1 MAX= 2 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
AP_RunCam::update MIN= 1 MAX= 66 AVG= 3 OVR= 1 SLP= 0, TOT= 0.0%
AP_GyroFFT::update MIN= 1 MAX= 188 AVG= 12 OVR= 19 SLP= 0, TOT= 0.6%
AP_GyroFFT::update_parameters MIN= 1 MAX= 1 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
AP_Vehicle::update_dynamic_notch MIN= 2 MAX= 214 AVG= 17 OVR= 10 SLP= 0, TOT= 0.8%
AP_VideoTX::update MIN= 1 MAX= 1 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
AP_Tramp::update MIN= 1 MAX= 42 AVG= 3 OVR= 0 SLP= 0, TOT= 0.0%
AP_Vehicle::send_watchdog_reset_ MIN= 3 MAX= 3 AVG= 3 OVR= 0 SLP= 0, TOT= 0.0%
AP_ESC_Telem::update MIN= 44 MAX= 381 AVG= 136 OVR= 40 SLP= 0, TOT= 1.8%
AP_Generator::update MIN= 1 MAX= 2 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
AP_Vehicle::publish_osd_info MIN= 9 MAX= 9 AVG= 9 OVR= 0 SLP= 0, TOT= 0.0%
AP_TemperatureSensor::update MIN= 1 MAX= 2 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
AP_Vehicle::accel_cal_update MIN= 1 MAX= 2 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
AC_Fence::update MIN= 1 MAX= 2 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
AP_AIS::update MIN= 1 MAX= 55 AVG= 19 OVR= 0 SLP= 0, TOT= 0.0%
AP_EFI::update MIN= 3 MAX= 60 AVG= 9 OVR= 0 SLP= 0, TOT= 0.1%
AP_Vehicle::one_Hz_update MIN= 2 MAX= 2 AVG= 2 OVR= 0 SLP= 0, TOT= 0.0%
AP_Vehicle::check_motor_noise MIN= 1 MAX= 2 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
AP_Filters::update MIN= 1 MAX= 1 AVG= 1 OVR= 0 SLP= 0, TOT= 0.0%
AP_Vehicle::update_arming MIN= 972 MAX= 972 AVG= 972 OVR= 1 SLP= 0, TOT= 0.2%
Another reboot and check gives
Copter::read_AHRS* MIN= 376 MAX=3848 AVG=1301 OVR= 74 SLP= 0, TOT=63.7%
and slightly lower Copter::update_flight_mode