pub enum DsoKey {
    Kernel,
    GuestKernel,
    Vdso32,
    VdsoX32,
    Vdso64,
    Vsyscall,
    KernelModule {
        name: String,
    },
    User {
        file_name: String,
        full_path: Vec<u8>,
    },
}
Expand description

A canonicalized key which can be used to cross-reference an Mmap record with an entry in the perf file’s build ID list.

This is needed because the entries sometimes don’t have matching path strings.

Examples:

  • Mmap path “[kernel.kallsyms]_text” + build ID map entry path “[kernel.kallsyms]”
  • Mmap path “[kernel.kallsyms]_text” + build ID map entry path “/full/path/to/vmlinux”

Variants§

§

Kernel

§

GuestKernel

§

Vdso32

§

VdsoX32

§

Vdso64

§

Vsyscall

§

KernelModule

Fields

§name: String

The name of the kernel module, without file extension, e.g. “snd-seq-device”.

We don’t store the full path in the key because the name is enough to uniquely identify the kernel module.

§

User

Fields

§file_name: String

The file name of the user-space DSO.

§full_path: Vec<u8>

The full path of the user-space DSO. This must be part of the key because there could be multiple DSOs with the same file name at different paths.

Implementations§

Make a DsoKey from a path and a CpuMode (which usually comes from a misc field).

Returns None for things which cannot be detected as a DSO, such as //anon mappings.

The name string for this DSO. This is a short string that you’d want to see in a profiler UI, for example.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.