diff options
Diffstat (limited to 'build-aux/measurestack')
-rw-r--r-- | build-aux/measurestack/app_main.py | 1 | ||||
-rw-r--r-- | build-aux/measurestack/app_plugins.py | 3 | ||||
-rw-r--r-- | build-aux/measurestack/test_app_plugins.py | 32 |
3 files changed, 8 insertions, 28 deletions
diff --git a/build-aux/measurestack/app_main.py b/build-aux/measurestack/app_main.py index f933967..c5b5a79 100644 --- a/build-aux/measurestack/app_main.py +++ b/build-aux/measurestack/app_main.py @@ -89,7 +89,6 @@ def main( if name in [ QName("__assert_msg_fail"), QName("__lm_printf"), - QName("__lm_light_printf"), QName("fmt_vfctprintf"), QName("fmt_vsnprintf"), ]: diff --git a/build-aux/measurestack/app_plugins.py b/build-aux/measurestack/app_plugins.py index c6e4512..8009c0c 100644 --- a/build-aux/measurestack/app_plugins.py +++ b/build-aux/measurestack/app_plugins.py @@ -397,8 +397,6 @@ class PicoFmtPlugin: # pico_stdio BaseName("__wrap_vprintf"): BaseName("stdio_buffered_printer"), BaseName("stdio_vprintf"): BaseName("stdio_buffered_printer"), - # libfmt - BaseName("__lm_light_printf"): BaseName("libfmt_light_fct"), } ) case "host": @@ -406,7 +404,6 @@ class PicoFmtPlugin: { # libfmt BaseName("__lm_printf"): BaseName("libfmt_libc_fct"), - BaseName("__lm_light_printf"): BaseName("libfmt_libc_fct"), } ) self.wont_call_v = set([*self.known_fct.values(), *wont_call_v]) diff --git a/build-aux/measurestack/test_app_plugins.py b/build-aux/measurestack/test_app_plugins.py index 8a29a12..808d55a 100644 --- a/build-aux/measurestack/test_app_plugins.py +++ b/build-aux/measurestack/test_app_plugins.py @@ -12,11 +12,11 @@ from .analyze import BaseName, QName def test_fct() -> None: - # 1. | a + | b + | c + | - # 2. | fmt_vsnprintf + | vprintf + | __lm_light_printf + | - # 3. | fmt_vfctprintf + | fmt_vfctprintf + | fmt_vfctprintf + | - # 4. | fmt_state_putchar + | fmt_state_putchar + | fmt_state_putchar + | - # 5. | _out_buffer + | stdio_buffered_printer + | libfmt_light_fct + | + # 1. | a + | b + | + # 2. | fmt_vsnprintf + | vprintf + | + # 3. | fmt_vfctprintf + | fmt_vfctprintf + | + # 4. | fmt_state_putchar + | fmt_state_putchar + | + # 5. | _out_buffer + | stdio_buffered_printer + | max_call_depth = 5 exp_a = ["a", "fmt_vsnprintf", "fmt_vfctprintf", "fmt_state_putchar", "_out_buffer"] exp_b = [ @@ -26,32 +26,19 @@ def test_fct() -> None: "fmt_state_putchar", "stdio_buffered_printer", ] - exp_c = [ - "c", - "__lm_light_printf", - "fmt_vfctprintf", - "fmt_state_putchar", - "libfmt_light_fct", - ] graph: typing.Sequence[tuple[str, typing.Collection[str]]] = [ # main.c ("a", {"fmt_vsnprintf"}), # _out_buffer ("b", {"vprintf"}), # stdio_buffered_printer - ("c", {"__lm_light_printf"}), # libfmt_light_printf # wrappers ("fmt_vsnprintf", {"fmt_vfctprintf"}), ("__wrap_vprintf", {"fmt_vfctprintf"}), - ("__lm_light_printf", {"fmt_vfctprintf"}), # printf.c ("fmt_vfctprintf", {"fmt_state_putchar"}), - ( - "fmt_state_putchar", - {"_out_buffer", "stdio_buffered_printer", "libfmt_light_fct"}, - ), + ("fmt_state_putchar", {"_out_buffer", "stdio_buffered_printer"}), # fcts ("_out_buffer", {}), ("stdio_buffered_printer", {}), - ("libfmt_light_fct", {}), ] graph_plugin = testutil.GraphProviderPlugin(max_call_depth, graph) @@ -62,10 +49,8 @@ def test_fct() -> None: # if rp2040: # __wrap_vprintf => fct=stdio_buffered_printer # stdio_vprintf => fct=stdio_buffered_printer - # __lm_light_printf => fct=libfmt_light_fct # if host: # __lm_printf => fct=libfmt_libc_fct - # __lm_light_printf => fct=libfmt_libc_fct app_plugins.PicoFmtPlugin("rp2040", []), ] @@ -85,7 +70,6 @@ def test_fct() -> None: graph_plugin.assert_nstatic(result.groups["Main"].rows[QName("a")].nstatic, exp_a) graph_plugin.assert_nstatic(result.groups["Main"].rows[QName("b")].nstatic, exp_b) - graph_plugin.assert_nstatic(result.groups["Main"].rows[QName("c")].nstatic, exp_c) def test_assert_formatter() -> None: @@ -124,9 +108,9 @@ def test_assert_formatter() -> None: ("conv_builtin", {"fmt_state_putchar"}), ("libfmt_conv_formatter", {"lib9p_msg_Rread_format"}), ("lib9p_msg_Rread_format", {"fmt_state_putchar", "fmt_state_printf"}), - ("fmt_state_putchar", {"stdio_buffered_printer", "libfmt_light_fct"}), + ("fmt_state_putchar", {"stdio_buffered_printer", "_out_buffer"}), ("stdio_buffered_printer", {}), - ("libfmt_light_fct", {}), # wrong fct + ("_out_buffer", {}), # wrong fct ] # 1 2 3 4 5 6 7 8 9 10 11 <= call_depth |