Profiling a program based on a combination of dynamic instrumentation and sampling

    公开(公告)号:US11892936B2

    公开(公告)日:2024-02-06

    申请号:US17718129

    申请日:2022-04-11

    IPC分类号: G06F11/36 G06F8/41

    CPC分类号: G06F11/3612 G06F8/41

    摘要: A computer system is configured to profile a program during an execution of the program. Profiling the program includes obtaining, by a first profiler, a first set of information associated with the execution of the program, and obtaining a second set of information associated with one or more executions of the function. The second set of information includes at least a call count or an execution time of each of the one or more executions of the function. The computer system then identifies a subset of the first set of information that is associated with the one or more executions of the function, and creates aggregate information based on the subset of the first set of information and the second set of information. The aggregated information is then reported.

    Instrumentation-based detection of accidental algorithmic complexity of a procedure

    公开(公告)号:US12124826B2

    公开(公告)日:2024-10-22

    申请号:US18095523

    申请日:2023-01-10

    IPC分类号: G06F8/41

    CPC分类号: G06F8/4441

    摘要: Techniques are described herein that are capable of detecting accidental algorithmic complexity of a procedure by using instrumentation. A number of times a parent procedure calls a child procedure during each of multiple executions of the parent procedure is detected by using instrumentation to provide call counts for the respective executions. A value of an attribute of the parent procedure during each of the executions is detected by using the instrumentation to provide attribute values for the respective executions. A function is generated that defines a curve that estimates a relationship between the attribute values for the respective executions and the call counts for the respective executions. Based at least on a slope of the curve, accidental algorithmic complexity of the parent procedure is determined. Based at least on the accidental algorithmic complexity satisfying a complexity criterion, a remedial action is performed with regard to the accidental algorithmic complexity.