Time consumption determination method and system based on GPIO port and computer readable storage medium

By setting GPIO port tracking points on the critical path of software operations and using an oscilloscope to measure the timestamps of level state changes, the problem of insufficient accuracy of the system timestamp function is solved, and high-precision time consumption measurement and intuitive analysis results are achieved.

CN120705004APending Publication Date: 2025-09-26东莞市步步高教育软件有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510784392.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the existing technology, the accuracy of the system timestamp function is insufficient, and it is impossible to achieve time-consuming decomposition at the microsecond level, resulting in insufficient performance analysis accuracy, and the timestamp marking method will interfere with system analysis.

Method used

By setting multiple GPIO port tracking points on the critical path of software operations, using an oscilloscope to measure the timestamps of GPIO port level state changes, and precisely controlling the GPIO port level changes to determine the time consumption.

Benefits of technology

It achieves high-precision time measurement, avoids the problem of insufficient precision of the system timestamp function, reduces the interference of log printing on system analysis, and provides an intuitive way to view time consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705004A_ABST
    Figure CN120705004A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer system performance debugging, in particular to a time consumption determination method and system based on a GPIO port and a computer readable storage medium. The method comprises the steps that a plurality of burying points are arranged on a critical path of software operation, and each burying point corresponds to one GPIO port; when the software operation passes through the first burying point, pulling up or pulling down the level of the first GPIO port corresponding to the first burying point; when the software operation passes through the second burying point, pulling up or pulling down the level of the second GPIO port corresponding to the second burying point; measuring and displaying level state changes of the first GPIO port and the second GPIO port through an oscilloscope, and reading a first timestamp when the level state of the first GPIO port changes and a second timestamp when the level state of the second GPIO port changes from the oscilloscope; and determining time consumption between the first burying point and the second burying point according to the first timestamp and the second timestamp. According to the method, the problem of insufficient timestamp function precision of the system is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer system performance debugging, and further relates to a method and system for determining time consumption based on a GPIO port, and a computer-readable storage medium. Background Art

[0002] In current performance analysis, for example, for time-consuming issues, a common approach is to use timestamp functions to perform time-consuming analysis and calculate the difference between timestamps. However, this approach may encounter limitations in practical applications. For example, some systems' timestamp functions only have millisecond (ms) accuracy, while actual analysis requirements may require further analysis down to the microsecond (us) level, leading to insufficient timestamp accuracy. Summary of the Invention

[0003] In order to solve the above technical problems, the present application provides a method, system and computer-readable storage medium for determining time consumption based on a GPIO port, which avoids the problem of insufficient accuracy of the system's timestamp function.

[0004] In the first aspect, the present application provides a method for determining the time consumption based on the GPIO port, including: setting multiple burial points on the critical path of the software operation, each burial point corresponding to a GPIO port; when the software operation passes through the first burial point, pulling up or lowering the level of the first GPIO port corresponding to the first burial point; when the software operation passes through the second burial point, pulling up or lowering the level of the second GPIO port corresponding to the second burial point; measuring and displaying the level state changes of the first GPIO port and the second GPIO port through an oscilloscope, and reading the first timestamp when the level state of the first GPIO port changes and the second timestamp when the level state of the second GPIO port changes from the oscilloscope; determining the time consumption between the first burial point and the second burial point based on the first timestamp and the second timestamp.

[0005] The above method for determining the time consumption based on the GPIO port sets multiple tracking points on the critical path of the software operation, changes the level state of the corresponding GPIO port when the software operation passes through different tracking points, and uses an oscilloscope to measure the timestamp of the level state change, so as to achieve high-precision time consumption measurement. The oscilloscope has a high time resolution, which enables it to accurately capture the moment when the GPIO port level changes, thereby providing an accurate timestamp. This high-precision time measurement capability enables this method to accurately calculate the time consumption between two tracking points, thereby avoiding the problem of insufficient accuracy of the system's timestamp function. In addition, this method can also effectively avoid the problem of interference and impact on system analysis caused by adding log printing in the method of determining the time consumption by timestamp.

[0006] In one implementation, the first burying point and the second burying point are respectively located at the starting position and the ending position of the same function, and the first GPIO port and the second GPIO port are the same GPIO port, and further includes: when the software operation passes through the first burying point, the level of the first GPIO port corresponding to the first burying point is pulled up, and when the software operation passes through the second burying point, the level of the second GPIO port corresponding to the second burying point is pulled down; or, when the software operation passes through the first burying point, the level of the first GPIO port corresponding to the first burying point is pulled down, and when the software operation passes through the second burying point, the level of the second GPIO port corresponding to the second burying point is pulled up.

[0007] The above GPIO-based timing determination method sets the start and end points of the same function as the first and second tracking points, respectively, and uses the same GPIO port to record the level changes at these two tracking points. By precisely controlling the level increase and decrease, the function's start and end points can be clearly identified, allowing the oscilloscope to accurately capture the timestamps of these two key points, thereby accurately calculating the function's execution time. This method not only solves the problem of insufficient precision of some system timestamp functions, but also avoids the interference of log printing on system analysis. The oscilloscope output provides a more intuitive view of the timing.

[0008] In one implementation, the initial level states of the first GPIO port and the second GPIO port are high level or low level.

[0009] In one implementation, when the software operation is a read or write operation, the locations of the tracking points include the file system layer, the block device layer, the driver layer, and the hardware layer.

[0010] In one implementation, the trigger conditions of the oscilloscope include rising edge triggering and falling edge triggering.

[0011] In the second aspect, the present application also provides a time-consuming determination system based on GPIO ports, including: a tracking point setting module, used to set multiple tracking points on the critical path of software operations, each tracking point corresponds to a GPIO port; a GPIO control module, used to pull up or down the level of the first GPIO port corresponding to the first tracking point when the software operation passes through the first tracking point; the GPIO control module, used to pull up or down the level of the second GPIO port corresponding to the second tracking point when the software operation passes through the second tracking point; an oscilloscope measurement module, used to measure and display the level state changes of the first GPIO port and the second GPIO port through an oscilloscope, and read the first timestamp when the level state of the first GPIO port changes and the second timestamp when the level state of the second GPIO port changes from the oscilloscope; a time-consuming calculation module, used to determine the time consumed between the first tracking point and the second tracking point based on the first timestamp and the second timestamp.

[0012] In one implementation, the first burying point and the second burying point are respectively located at the starting position and the ending position of the same function, and the first GPIO port and the second GPIO port are the same GPIO port; the GPIO control module is used to pull up the level of the first GPIO port corresponding to the first burying point when the software operation passes through the first burying point, and to pull down the level of the second GPIO port corresponding to the second burying point when the software operation passes through the second burying point; or, the GPIO control module is used to pull down the level of the first GPIO port corresponding to the first burying point when the software operation passes through the first burying point, and to pull up the level of the second GPIO port corresponding to the second burying point when the software operation passes through the second burying point.

[0013] In one implementation, the initial level states of the first GPIO port and the second GPIO port are high level or low level.

[0014] In one implementation, when the software operation is a read or write operation, the locations of the tracking points include the file system layer, the block device layer, the driver layer, and the hardware layer.

[0015] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-mentioned methods for determining the time consumption based on the GPIO port.

[0016] Compared with the prior art, the present invention has at least one of the following beneficial effects:

[0017] 1. By setting multiple tracking points on the critical path of the software operation, and changing the level state of the corresponding GPIO port when the software operation passes through different tracking points, and using an oscilloscope to measure the timestamp of the level state change, high-precision time measurement can be achieved. The oscilloscope has a high time resolution, which enables it to accurately capture the moment when the GPIO port level changes, thereby providing an accurate timestamp. This high-precision time measurement capability enables this method to accurately calculate the time between two tracking points, thereby avoiding the problem of insufficient accuracy of the system's timestamp function. In addition, this method can also effectively circumvent the problem of interference and impact on system analysis caused by adding log printing in the method of determining the time consumption by timestamp.

[0018] 2. Set the start and end points of the same function as the first and second tracking points, respectively, and use the same GPIO port to record the level changes at these two tracking points. By precisely controlling the level increase and decrease, the start and end of the function can be clearly identified, allowing the oscilloscope to accurately capture the timestamps of these two key points, thereby accurately calculating the function's execution time. This method not only solves the problem of insufficient precision of some system timestamp functions, but also avoids the interference of log printing on system analysis. The oscilloscope output provides a more intuitive view of the execution time. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The preferred embodiments will be described below in a clear and understandable manner with reference to the accompanying drawings to further illustrate the above-mentioned characteristics, technical features, advantages and implementation methods of the present invention.

[0020] Figure 1 A flowchart of a method for determining time consumption based on a GPIO port provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific embodiments of the present invention will be described below with reference to the accompanying drawings. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings and other embodiments can be obtained based on these drawings without inventive work.

[0022] To simplify the drawings, only portions relevant to the invention are schematically depicted in each figure; they do not represent the actual structure of the product. Furthermore, to simplify the drawings and facilitate understanding, in some figures, only one component with the same structure or function is schematically depicted or labeled. In this document, "one" not only means "only one" but also "more than one."

[0023] It should be further understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0024] It should be noted that, unless otherwise specified or limited, the terms "mounted," "connected," and "connected" should be understood broadly. For example, they can refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediary; and internal communication between two components. Those skilled in the art will understand the specific meanings of these terms in the present invention based on the specific circumstances.

[0025] In addition, in the description of the present application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0026] It should be noted that the above embodiments can be freely combined as needed. The above are only preferred embodiments of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principles of the present invention, and such improvements and modifications should also be considered within the scope of protection of the present invention.

[0027] Burying point is a commonly used term in software development, data analysis and performance monitoring. It refers to the pre-setting of some specific monitoring points in the software system for collecting data, analyzing performance or monitoring the operating status of the system. That is, the core of the burying point is to insert specific monitoring logic at the key position of the code so as to collect data or trigger specific behaviors at runtime. The embodiment of the present application sets multiple burying points on the critical path of the software operation through a combination of software and hardware, wherein each burying point corresponds to a GPIO (general input and output) port on the hardware. All GPIO ports are connected to an oscilloscope. When the software operation passes through a certain burying point, the level of the GPIO port corresponding to the burying point is pulled up / down to measure and display the level state change of each GPIO port through the oscilloscope, and then the corresponding time consumption is determined.

[0028] The following is explained with reference to the accompanying drawings:

[0029] Reference Attachment Figure 1 , which shows a flow chart of a method for determining the time consumption based on a GPIO port provided by an embodiment of the present application. Figure 1 As shown, including:

[0030] S100,sets multiple tracking points on the critical path of software operation, each tracking point corresponds to a GPIO port.

[0031] S110, when the software operation passes through the first buried point, the level of the first GPIO port corresponding to the first buried point is pulled up or down.

[0032] S120, when the software operation passes through the second buried point, the level of the second GPIO port corresponding to the second buried point is pulled up or down.

[0033] S130, measuring and displaying the level state changes of the first GPIO port and the second GPIO port through an oscilloscope, and reading from the oscilloscope a first timestamp when the level state of the first GPIO port changes and a second timestamp when the level state of the second GPIO port changes.

[0034] S140: Determine the time taken between the first burial point and the second burial point based on the first timestamp and the second timestamp.

[0035] Find the redundant GPIO ports on the hardware that are not used by the software, connect these GPIO ports to the oscilloscope, and configure the pins of the GPIO ports to output mode. Set multiple tracking points on the critical path of the software operation, where each tracking point corresponds to a GPIO port, and the GPIO ports corresponding to each tracking point can be the same or different. The setting of tracking points can be set according to user needs. For example, a tracking point can be set at the start and end positions of the same function to determine the time consumed within the function; for another example, a tracking point can be set at the start position of a function and a tracking point can be set at the end position of another function to determine the time consumed between the two functions; for another example, a tracking point can be set at the software operation entry and software operation exit of each software layer to determine the time consumed by the software operation at each software layer, where the software layer includes but is not limited to the file system layer, block device layer, driver layer and hardware layer, and the software operation includes but is not limited to read and write operations, data sending and receiving operations, etc.

[0036] Taking the software operation as a read and write operation as an example, and when the tracking point is set at the software layer, for example, the first tracking point is set at the read and write operation entry of the file system layer (for example, in the `vfs_read` and `vfs_write` functions), and the second tracking point is set at the read and write operation exit of the file system layer, when the read and write operation passes through the first tracking point, the level of the first GPIO port is pulled up or down (before the read and write operation passes through the first tracking point, if the level of the first GPIO port is low, the level is pulled up; if the level of the first GPIO port is high, the level is pulled down), and the level state change of the first GPIO port is measured and displayed through an oscilloscope. When the read and write operation passes through the second tracking point (or the read and write operation is completed), the level of the second GPIO port is pulled up or down (similarly, before the read and write operation passes through the second tracking point, if the level of the second GPIO port is low, the level is pulled up; if the level of the second GPIO port is high, the level is pulled down), and the level state change of the second GPIO port is measured and displayed through an oscilloscope. From the oscilloscope, read the first timestamp when the level status of the first GPIO port changes, and the second timestamp when the level status of the second GPIO port changes. Based on the first and second timestamps, the duration between the first and second tracking points can be determined, which in turn determines the duration of the read and write operations at the file system layer. The calculated duration is then saved to a log file or displayed on the debugging interface.

[0037] The first tracking point can also be set at the entry of the read and write operation of the block device layer (for example, in the `submit_bio` function), and the second tracking point is set at the exit of the read and write operation of the block device layer. When the read and write operation passes through the first tracking point, the level of the first GPIO port is pulled up or down, and the level state change of the first GPIO port is measured and displayed through an oscilloscope. When the read and write operation passes through the second tracking point, the level of the second GPIO port is pulled up or down, and the level state change of the second GPIO port is measured and displayed through an oscilloscope. The first timestamp when the level state of the first GPIO port changes and the second timestamp when the level state of the second GPIO port changes are read from the oscilloscope. Then, based on the first timestamp and the second timestamp, the time consumed between the first tracking point and the second tracking point can be determined, that is, the time consumed by the read and write operation at the block device layer can be determined. Finally, the calculated time consumption is saved to the log file or displayed on the debugging interface.

[0038] The first buried point can also be set at the read and write operation entry of the driver layer (for example,

[0039] `mmc_blk_issue_rw_rq` function), the second buried point is set at the read and write operation exit of the driver layer. When the read and write operation passes through the first buried point, the level of the first GPIO port is pulled up or down, and the level state change of the first GPIO port is measured and displayed through an oscilloscope. When the read and write operation passes through the second buried point, the level of the second GPIO port is pulled up or down, and the level state change of the second GPIO port is measured and displayed through an oscilloscope. Read the first timestamp when the level state of the first GPIO port changes and the second timestamp when the level state of the second GPIO port changes from the oscilloscope. Then, based on the first timestamp and the second timestamp, the time consumed between the first buried point and the second buried point can be determined, that is, the time consumed by the read and write operation in the driver layer can be determined. Finally, the calculated time consumption is saved to the log file or displayed on the debugging interface.

[0040] The first embedding point can also be set at the read and write operation entry of the hardware layer (for example,

[0041] `mmc_host_send_cmd` function), the second buried point is set at the read and write operation exit of the hardware layer. When the read and write operation passes through the first buried point, the level of the first GPIO port is pulled up or down, and the level state change of the first GPIO port is measured and displayed through an oscilloscope. When the read and write operation passes through the second buried point, the level of the second GPIO port is pulled up or down, and the level state change of the second GPIO port is measured and displayed through an oscilloscope. Read the first timestamp when the level state of the first GPIO port changes and the second timestamp when the level state of the second GPIO port changes from the oscilloscope. Then, based on the first timestamp and the second timestamp, the time consumed between the first buried point and the second buried point can be determined, that is, the time consumed by the read and write operation at the hardware layer can be determined. Finally, the calculated time consumption is saved to the log file or displayed on the debugging interface.

[0042] The embodiment of the present application sets multiple buried points on the critical path of the software operation, changes the level state of the corresponding GPIO port when the software operation passes through different buried points, and uses an oscilloscope to measure the timestamp of the level state change, so as to achieve high-precision time measurement. The oscilloscope has a high time resolution, which enables it to accurately capture the moment when the GPIO port level changes, thereby providing an accurate timestamp. This high-precision time measurement capability enables the method to accurately calculate the time between two buried points, thereby avoiding the problem of insufficient accuracy of the system's timestamp function. In addition, the method can also effectively avoid the problem of interference and impact on system analysis caused by adding log printing in the method of determining the time consumption by timestamp dot.

[0043] In one embodiment of the present application, the first burying point and the second burying point are respectively located at the starting position and the ending position of the same function, and the first GPIO port and the second GPIO port are the same GPIO port, and further includes: when the software operation passes through the first burying point, the level of the first GPIO port corresponding to the first burying point is pulled up, and when the software operation passes through the second burying point, the level of the second GPIO port corresponding to the second burying point is pulled down; or, when the software operation passes through the first burying point, the level of the first GPIO port corresponding to the first burying point is pulled down, and when the software operation passes through the second burying point, the level of the second GPIO port corresponding to the second burying point is pulled up.

[0044] When the user wants to determine the time consumed within a function, the first burial point and the second burial point can be set at the start and end positions of the same function respectively, or the first burial point and the second burial point can be set at the end and start positions of the same function respectively, and the first GPIO port corresponding to the first burial point and the second GPIO port corresponding to the second burial point can be the same GPIO port.

[0045] For example, consider setting the first and second buried points at the start and end of the same function, respectively. Configure the pins of the first and second GPIO ports to output mode and set their initial levels to low. When the software passes through the first buried point, the level of the first GPIO port is raised, and the oscilloscope measures and displays the change in the level of the first GPIO port. When the software passes through the second buried point, the level of the second GPIO port is lowered, and the oscilloscope measures and displays the change in the level of the second GPIO port. The oscilloscope then reads the first timestamp of the change in the level of the first GPIO port and the second timestamp of the change in the level of the second GPIO port. Based on the first and second timestamps, the time elapsed between the first and second buried points can be determined, thereby determining the time elapsed within the function.

[0046] Similarly, taking the example of setting the first and second buried points at the start and end of the same function, respectively, configure the pins of the first and second GPIO ports to output mode and set their initial levels to high. When the software operation passes through the first buried point, the level of the first GPIO port is lowered, and the oscilloscope measures and displays the change in the level of the first GPIO port. When the software operation passes through the second buried point, the level of the second GPIO port is raised, and the oscilloscope measures and displays the change in the level of the second GPIO port. The oscilloscope then reads the first timestamp of the change in the level of the first GPIO port and the second timestamp of the change in the level of the second GPIO port. Based on the first and second timestamps, the elapsed time between the first and second buried points can be determined, that is, the elapsed time within the function can be determined.

[0047] In the embodiment of the present application, the starting position and the ending position of the same function are set as the first buried point and the second buried point respectively, and the same GPIO port is used to record the level changes of the two buried points. By precisely controlling the raising and lowering of the level, the start and end of the function can be clearly identified, so that the oscilloscope can accurately capture the timestamps of these two key points, thereby accurately calculating the execution time of the function. This method can not only solve the problem of insufficient accuracy of some system timestamp functions, but also avoid the interference of log printing on system analysis, and it is more intuitive to view the time consumption through the oscilloscope output.

[0048] In one embodiment of the present application, the initial level states of the first GPIO port and the second GPIO port are high level or low level.

[0049] In one embodiment of the present application, when the software operation is a read or write operation, the locations of the embedded points include the file system layer, the block device layer, the driver layer, and the hardware layer.

[0050] In one embodiment of the present application, the trigger conditions of the oscilloscope include rising edge triggering and falling edge triggering.

[0051] An embodiment of the present application also provides a time-consuming determination system based on a GPIO port, including: a tracking point setting module, used to set multiple tracking points on the critical path of the software operation, each tracking point corresponds to a GPIO port; a GPIO control module, used to pull up or down the level of the first GPIO port corresponding to the first tracking point when the software operation passes through the first tracking point; the GPIO control module, used to pull up or down the level of the second GPIO port corresponding to the second tracking point when the software operation passes through the second tracking point; an oscilloscope measurement module, used to measure and display the level state changes of the first GPIO port and the second GPIO port through an oscilloscope, and read the first timestamp when the level state of the first GPIO port changes and the second timestamp when the level state of the second GPIO port changes from the oscilloscope; a time-consuming calculation module, used to determine the time consumed between the first tracking point and the second tracking point based on the first timestamp and the second timestamp.

[0052] The details of the embodiments of the present application have been described in the aforementioned embodiments and will not be repeated here.

[0053] In one embodiment of the present application, the first burying point and the second burying point are respectively located at the starting position and the ending position of the same function, and the first GPIO port and the second GPIO port are the same GPIO port; the GPIO control module is used to pull up the level of the first GPIO port corresponding to the first burying point when the software operation passes through the first burying point, and to pull down the level of the second GPIO port corresponding to the second burying point when the software operation passes through the second burying point; or, the GPIO control module is used to pull down the level of the first GPIO port corresponding to the first burying point when the software operation passes through the first burying point, and to pull up the level of the second GPIO port corresponding to the second burying point when the software operation passes through the second burying point.

[0054] In one embodiment of the present application, the initial level states of the first GPIO port and the second GPIO port are high level or low level.

[0055] In one embodiment of the present application, when the software operation is a read or write operation, the locations of the embedded points include the file system layer, the block device layer, the driver layer, and the hardware layer.

[0056] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for determining the time consumption based on the GPIO port of any of the above embodiments are implemented.

[0057] It should be noted that the above embodiments can be freely combined as needed. The above are only preferred embodiments of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principles of the present invention, and such improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for determining time consumption based on a GPIO port, characterized in that: include: Set multiple tracking points on the critical path of software operation, each tracking point corresponds to a GPIO port; When the software operation passes through a first buried point, raising or lowering the level of a first GPIO port corresponding to the first buried point; When the software operation passes through the second buried point, the level of the second GPIO port corresponding to the second buried point is pulled up or down; measuring and displaying level state changes of the first GPIO port and the second GPIO port through an oscilloscope, and reading from the oscilloscope a first timestamp when the level state of the first GPIO port changes and a second timestamp when the level state of the second GPIO port changes; Determine the time taken between the first burial point and the second burial point based on the first timestamp and the second timestamp.

2. The method for determining the time consumption based on the GPIO port according to claim 1, characterized in that: The first buried point and the second buried point are respectively located at the start position and the end position of the same function, and the first GPIO port and the second GPIO port are the same GPIO port, further comprising: When the software operation passes through a first buried point, the level of a first GPIO port corresponding to the first buried point is pulled up, and when the software operation passes through a second buried point, the level of a second GPIO port corresponding to the second buried point is pulled down; or, When the software operation passes through the first buried point, the level of the first GPIO port corresponding to the first buried point is lowered, and when the software operation passes through the second buried point, the level of the second GPIO port corresponding to the second buried point is raised.

3. The method for determining the time consumption based on the GPIO port according to claim 2, characterized in that: The initial level states of the first GPIO port and the second GPIO port are high level or low level.

4. The method for determining the time consumption based on the GPIO port according to any one of claims 1 to 3, characterized in that: When the software operation is a read-write operation, the locations of the buried points include the file system layer, the block device layer, the driver layer, and the hardware layer.

5. The method for determining the time consumption based on the GPIO port according to any one of claims 1 to 3, characterized in that: The trigger conditions of the oscilloscope include rising edge triggering and falling edge triggering.

6. A time-consuming determination system based on a GPIO port, characterized in that: include: The tracking point setting module is used to set multiple tracking points on the critical path of software operation, each of which corresponds to a GPIO port; A GPIO control module, configured to raise or lower the level of a first GPIO port corresponding to a first buried point when the software operation passes through the first buried point; The GPIO control module is configured to, when the software operation passes through a second buried point, pull up or lower the level of a second GPIO port corresponding to the second buried point; an oscilloscope measurement module, configured to measure and display level state changes of the first GPIO port and the second GPIO port through an oscilloscope, and read from the oscilloscope a first timestamp when the level state of the first GPIO port changes and a second timestamp when the level state of the second GPIO port changes; A time consumption calculation module is used to determine the time consumption between the first burial point and the second burial point based on the first timestamp and the second timestamp.

7. The time consumption determination system based on GPIO port according to claim 6, characterized in that: The first buried point and the second buried point are respectively located at the start position and the end position of the same function, and the first GPIO port and the second GPIO port are the same GPIO port; The GPIO control module is configured to, when the software operation passes through a first buried point, pull up the level of a first GPIO port corresponding to the first buried point, and when the software operation passes through a second buried point, pull down the level of a second GPIO port corresponding to the second buried point; or, The GPIO control module is used to lower the level of the first GPIO port corresponding to the first buried point when the software operation passes through the first buried point, and to raise the level of the second GPIO port corresponding to the second buried point when the software operation passes through the second buried point.

8. The time consumption determination system based on GPIO port according to claim 7, characterized in that: The initial level states of the first GPIO port and the second GPIO port are high level or low level.

9. The GPIO port-based time consumption determination system according to any one of claims 6 to 8, characterized in that: When the software operation is a read-write operation, the locations of the buried points include the file system layer, the block device layer, the driver layer, and the hardware layer.

10. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method for determining the time consumption based on the GPIO port according to any one of claims 1 to 5 are implemented.