The embodiment of the invention provides a method for obtaining operation information and related equipment. The invention provides an efficient scheme for obtaining the operation information of the application program. The method includes: when a
stream conversion method in a performance analysis application is triggered, an extended Berkeley packet filter (eBPF)
virtual machine (VM) running in a kernel space obtains thread data, the first thread data comprises N table entries, each table entry in the N table entries corresponds to one method in the performance analysis application, and the first thread data comprises a first thread data and a second thread data, each table entry in the N table entries corresponds to one method in the performance analysis application, and each table entry in the N table entries corresponds to one method in the performance analysis application. The N table items comprise a first table item, and the first table item corresponds to the triggered
stream conversion method; the eBPF VM determines a target method according to the thread data, and the target method is called by the triggered
stream conversion method; the eBPF VM performs performance analysis on the performance analysis application program to obtain a stack tracking result, the stack tracking result comprises a plurality of table entries, the table entries are in one-to-one correspondence with a plurality of methods, the table entries comprise a second table entry, and the second table entry corresponds to the target method; a collector running in a
user space obtains the thread data and the stack tracking result from the eBPF VM; and the collector determines operation information of the performance analysis application program according to the thread data and the stack tracking result. According to the technical scheme, the eBPF VM can perform performance analysis on the performance analysis application program in the kernel space. In addition to the performance analysis application, the eBPF VM may obtain thread data and stack tracking results for other applications. No code is injected into the performance analysis application and / or the
user space of the performance analysis application so that no damage is caused by
code injection.