diff --git a/tasmota/support_profiling.ino b/tasmota/support_profiling.ino index f45ba2549..fa2e6f764 100644 --- a/tasmota/support_profiling.ino +++ b/tasmota/support_profiling.ino @@ -68,7 +68,7 @@ void AddLogDriver(const char *driver, uint8_t function, uint32_t start) { uint32_t profile_millis = millis() - start; if (profile_millis > PROFILE_THRESHOLD) { char stemp1[20]; - AddLog(LOG_LEVEL_DEBUG, PSTR("PRF: *** %s FUNC_%s (%d ms)"), driver, GetTextIndexed(stemp1, sizeof(stemp1), function, kXSnsFunctions), profile_millis); + AddLog(LOG_LEVEL_DEBUG, PSTR("PRF: *** x%s FUNC_%s (%d ms)"), driver, GetTextIndexed(stemp1, sizeof(stemp1), function, kXSnsFunctions), profile_millis); } } #endif // USE_PROFILE_DRIVER @@ -78,7 +78,7 @@ void AddLogFunction(const char *driver, uint8_t index, uint8_t function, uint32_ uint32_t profile_millis = millis() - start; if (profile_millis > PROFILE_THRESHOLD) { char stemp1[20]; - AddLog(LOG_LEVEL_DEBUG, PSTR("PRF: *** %s_%02d FUNC_%s (%d ms)"), driver, index, GetTextIndexed(stemp1, sizeof(stemp1), function, kXSnsFunctions), profile_millis); + AddLog(LOG_LEVEL_DEBUG, PSTR("PRF: *** x%s_%02d FUNC_%s (%d ms)"), driver, index, GetTextIndexed(stemp1, sizeof(stemp1), function, kXSnsFunctions), profile_millis); } } #endif // USE_PROFILE_DRIVER diff --git a/tasmota/xdrv_interface.ino b/tasmota/xdrv_interface.ino index 7f372af78..dcf763935 100644 --- a/tasmota/xdrv_interface.ino +++ b/tasmota/xdrv_interface.ino @@ -1145,7 +1145,14 @@ bool XdrvCall(uint8_t Function) result = xdrv_func_ptr[x](Function); - PROFILE_FUNCTION(PSTR("xdrv"), kXdrvList[x], Function, profile_function_start); +#ifdef USE_PROFILE_FUNCTION +#ifdef XFUNC_PTR_IN_ROM + uint32_t index = pgm_read_byte(kXdrvList + x); +#else + uint32_t index = kXdrvList[x]; +#endif + PROFILE_FUNCTION("drv", index, Function, profile_function_start); +#endif // USE_PROFILE_FUNCTION if (result && ((FUNC_COMMAND == Function) || (FUNC_COMMAND_DRIVER == Function) || @@ -1162,7 +1169,7 @@ bool XdrvCall(uint8_t Function) } } - PROFILE_DRIVER(PSTR("xdrv"), Function, profile_driver_start); + PROFILE_DRIVER("drv", Function, profile_driver_start); return result; } diff --git a/tasmota/xsns_interface.ino b/tasmota/xsns_interface.ino index bbbc57bc9..c4477447a 100644 --- a/tasmota/xsns_interface.ino +++ b/tasmota/xsns_interface.ino @@ -1126,7 +1126,14 @@ bool XsnsCall(uint8_t Function) { result = xsns_func_ptr[x](Function); - PROFILE_FUNCTION(PSTR("xsns"), kXsnsList[x], Function, profile_function_start); +#ifdef USE_PROFILE_FUNCTION +#ifdef XFUNC_PTR_IN_ROM + uint32_t index = pgm_read_byte(kXsnsList + x); +#else + uint32_t index = kXsnsList[x]; +#endif + PROFILE_FUNCTION("sns", index, Function, profile_function_start); +#endif // USE_PROFILE_FUNCTION if (result && ((FUNC_COMMAND == Function) || (FUNC_PIN_STATE == Function) || @@ -1137,7 +1144,7 @@ bool XsnsCall(uint8_t Function) { } } - PROFILE_DRIVER(PSTR("xsns"), Function, profile_driver_start); + PROFILE_DRIVER("sns", Function, profile_driver_start); return result; }