Skip to content

Shared Cache / Kernel Cache views should stop using AddUserSection #7069

Open
@bdash

Description

@bdash

The Shared Cache / Kernel Cache views currently use AddUserSection when loading images. For example:

// Typically a view would add auto sections but those won't persist when loading the BNDB.
// if we want to use an auto section here we would need to allow the core to apply auto sections from the database.
m_view->AddUserSection(sectionName, section.addr, section.size, semantics, type, section.align);

This is because the sections need to be persisted in the database.

A side-effect of AddUserSection is that an undo entry is created. This is problematic for performance if the calls happen on a background thread, and it's not clear that it's even desirable. Loading a single image from a shared cache might create 20 sections and thus 20 undo actions.

When an alternative API to AddUserSection is added that allows persistence of sections without creating undo actions, Shared Cache / Kernel Cache should switch to it. This may come as part of #6742.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions