-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Documenter.jl
committed
Sep 4, 2023
1 parent
6a7ca9b
commit 10b57ff
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Home · PkgCacheInspector.jl</title><script data-outdated-warner src="assets/warner.js"></script><link rel="canonical" href="https://timholy.github.io/PkgCacheInspector.jl/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href>PkgCacheInspector.jl</a></span></div><form class="docs-search" action="search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li class="is-active"><a class="tocitem" href>Home</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Home</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Home</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/timholy/PkgCacheInspector.jl/blob/main/docs/src/index.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="PkgCacheInspector"><a class="docs-heading-anchor" href="#PkgCacheInspector">PkgCacheInspector</a><a id="PkgCacheInspector-1"></a><a class="docs-heading-anchor-permalink" href="#PkgCacheInspector" title="Permalink"></a></h1><p>Documentation for <a href="https://github.com/timholy/PkgCacheInspector.jl">PkgCacheInspector</a>.</p><div class="admonition is-success"><header class="admonition-header">Tip</header><div class="admonition-body"><p>See the <a href="https://github.com/timholy/PkgCacheInspector.jl#pkgcacheinspector">README</a> for a usage demo.</p></div></div><p>This documentation provides reference information which may be useful for understanding more about the information returned by <a href="#PkgCacheInspector.info_cachefile"><code>info_cachefile</code></a>.</p><ul><li><a href="#PkgCacheInspector.PkgCacheInfo"><code>PkgCacheInspector.PkgCacheInfo</code></a></li><li><a href="#PkgCacheInspector.PkgCacheSizes"><code>PkgCacheInspector.PkgCacheSizes</code></a></li><li><a href="#PkgCacheInspector.info_cachefile"><code>PkgCacheInspector.info_cachefile</code></a></li></ul><article class="docstring"><header><a class="docstring-binding" id="PkgCacheInspector.info_cachefile" href="#PkgCacheInspector.info_cachefile"><code>PkgCacheInspector.info_cachefile</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">info_cachefile(pkgname::AbstractString) → cf | ||
info_cachefile(pkgid::Base.PkgId) → cf | ||
info_cachefile(pkgid::Base.PkgId, ji_cachefilename) → cf</code></pre><p>Return a snapshot <code>cf</code> of a package cache file. Displaying <code>cf</code> prints a summary of the contents, but the fields of <code>cf</code> can be inspected to get further information (see <a href="#PkgCacheInspector.PkgCacheInfo"><code>PkgCacheInfo</code></a>).</p><p>After calling <code>info_cachefile("MyPkg")</code> you can also execute <code>using MyPkg</code> to make the image loaded by <code>info_cachefile</code> available for use. This can allow you to load <code>cf</code>s for multiple packages into the same session for deeper analysis.</p><div class="admonition is-category-warn"><header class="admonition-header">Warn</header><div class="admonition-body"><p>Your session may be corrupted if you run <code>info_cachefile</code> for a package that had already been loaded into your session. Restarting with a clean session and using <code>info_cachefile</code> before otherwise loading the package is recommended.</p></div></div></div><a class="docs-sourcelink" target="_blank" href="https://github.com/timholy/PkgCacheInspector.jl/blob/8c3de0ce3f53882954b551c285805678b3d0a4ca/src/PkgCacheInspector.jl#L239-L255">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="PkgCacheInspector.PkgCacheInfo" href="#PkgCacheInspector.PkgCacheInfo"><code>PkgCacheInspector.PkgCacheInfo</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct PkgCacheInfo</code></pre><p>Objects stored the pkgimage. The main contents are the modules themselves, but some additional objects are stored external to the modules. It also contains the data used to perform invalidation-checks.</p><ul><li><code>cachefile</code></li></ul><p>: The filename of the cache.</p><ul><li><code>modules</code></li></ul><p>: The list of modules stored in the package image. The final one is the "top" package module.</p><ul><li><code>init_order</code></li></ul><p>: The list of modules with an <code>__init__</code> function, in the order in which they should be called.</p><ul><li><code>external_methods</code></li></ul><p>: The list of methods added to external modules. E.g., <code>Base.push!(v::MyNewVector, x)</code>.</p><ul><li><code>new_specializations</code></li></ul><p>: The list of novel specializations of external methods that were created during package precompilation. E.g., <code>get(::Dict{String,Float16}, ::String, ::Nothing)</code>: <code>Base</code> owns the method and all the types in this specialization, but might not have precompiled it until it was needed by a package.</p><ul><li><code>new_method_roots</code></li></ul><p>: New GC roots added to external methods. These are an important but internal detail of how type-inferred code is compressed for serialization.</p><ul><li><code>external_targets</code></li></ul><p>: The list of already-inferred MethodInstances that get called by items stored in this cachefile. If any of these are no longer valid (or no longer the method that would be chosen by dispatch), then some compiled code in this package image must be invalidated and recompiled.</p><ul><li><code>edges</code></li></ul><p>: A lookup table of <code>external_targets</code> dependencies: <code>[mi1, indxs1, mi2, indxs2...]</code> means that <code>mi1</code> (cached in this pkgimage) depends on <code>external_targets[idxs1]</code>; <code>mi2</code> depends on <code>external_targets[idxs2]</code>, and so on.</p><ul><li><code>filesize</code></li></ul><p>: The total size of the cache file.</p><ul><li><code>cachesizes</code></li></ul><p>: Sizes of the individual sections. See <a href="#PkgCacheInspector.PkgCacheSizes"><code>PkgCacheSizes</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/timholy/PkgCacheInspector.jl/blob/8c3de0ce3f53882954b551c285805678b3d0a4ca/src/PkgCacheInspector.jl#L88">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="PkgCacheInspector.PkgCacheSizes" href="#PkgCacheInspector.PkgCacheSizes"><code>PkgCacheInspector.PkgCacheSizes</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct PkgCacheSizes</code></pre><p>Stores the sizes of different "sections" of the pkgimage. The main section is the package image itself. However, reconstructing a pkgimage for use requires auxillary data, like the addresses of internal pointers that need to be modified to account for the actual base address into which the pkgimage was loaded. Each form of auxillary data gets stored in distinct sections.</p><ul><li><code>sysdata</code></li></ul><p>: Size of the image. This is the portion of the file that gets returns by <code>info_cachefile</code>.</p><ul><li><code>isbitsdata</code></li></ul><p>: Size of the <code>const</code> internal data section (storing things not visible from Julia, like datatype layouts).</p><ul><li><code>symboldata</code></li></ul><p>: Size of the symbol section, for Symbols stored in the image.</p><ul><li><code>tagslist</code></li></ul><p>: Size of the GC tags section, holding references to objects that require special re-initialization for GC.</p><ul><li><code>reloclist</code></li></ul><p>: Size of the relocation-list section, holding references to within-image pointers that need to be offset by the actual base pointer upon reloading.</p><ul><li><code>gvarlist</code></li></ul><p>: Size of the "gvar" (global variable) list of LLVM-encoded objects.</p><ul><li><code>fptrlist</code></li></ul><p>: Size of the function-pointer list, referencing native code.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/timholy/PkgCacheInspector.jl/blob/8c3de0ce3f53882954b551c285805678b3d0a4ca/src/PkgCacheInspector.jl#L12">source</a></section></article></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.23 on <span class="colophon-date" title="Sunday 2 April 2023 08:30">Sunday 2 April 2023</span>. Using Julia version 1.10.0-DEV.938.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> | ||
info_cachefile(pkgid::Base.PkgId, ji_cachefilename) → cf</code></pre><p>Return a snapshot <code>cf</code> of a package cache file. Displaying <code>cf</code> prints a summary of the contents, but the fields of <code>cf</code> can be inspected to get further information (see <a href="#PkgCacheInspector.PkgCacheInfo"><code>PkgCacheInfo</code></a>).</p><p>After calling <code>info_cachefile("MyPkg")</code> you can also execute <code>using MyPkg</code> to make the image loaded by <code>info_cachefile</code> available for use. This can allow you to load <code>cf</code>s for multiple packages into the same session for deeper analysis.</p><div class="admonition is-category-warn"><header class="admonition-header">Warn</header><div class="admonition-body"><p>Your session may be corrupted if you run <code>info_cachefile</code> for a package that had already been loaded into your session. Restarting with a clean session and using <code>info_cachefile</code> before otherwise loading the package is recommended.</p></div></div></div><a class="docs-sourcelink" target="_blank" href="https://github.com/timholy/PkgCacheInspector.jl/blob/6552676a84f81b43a1be3736484edd8fd160406e/src/PkgCacheInspector.jl#L239-L255">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="PkgCacheInspector.PkgCacheInfo" href="#PkgCacheInspector.PkgCacheInfo"><code>PkgCacheInspector.PkgCacheInfo</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct PkgCacheInfo</code></pre><p>Objects stored the pkgimage. The main contents are the modules themselves, but some additional objects are stored external to the modules. It also contains the data used to perform invalidation-checks.</p><ul><li><code>cachefile</code></li></ul><p>: The filename of the cache.</p><ul><li><code>modules</code></li></ul><p>: The list of modules stored in the package image. The final one is the "top" package module.</p><ul><li><code>init_order</code></li></ul><p>: The list of modules with an <code>__init__</code> function, in the order in which they should be called.</p><ul><li><code>external_methods</code></li></ul><p>: The list of methods added to external modules. E.g., <code>Base.push!(v::MyNewVector, x)</code>.</p><ul><li><code>new_specializations</code></li></ul><p>: The list of novel specializations of external methods that were created during package precompilation. E.g., <code>get(::Dict{String,Float16}, ::String, ::Nothing)</code>: <code>Base</code> owns the method and all the types in this specialization, but might not have precompiled it until it was needed by a package.</p><ul><li><code>new_method_roots</code></li></ul><p>: New GC roots added to external methods. These are an important but internal detail of how type-inferred code is compressed for serialization.</p><ul><li><code>external_targets</code></li></ul><p>: The list of already-inferred MethodInstances that get called by items stored in this cachefile. If any of these are no longer valid (or no longer the method that would be chosen by dispatch), then some compiled code in this package image must be invalidated and recompiled.</p><ul><li><code>edges</code></li></ul><p>: A lookup table of <code>external_targets</code> dependencies: <code>[mi1, indxs1, mi2, indxs2...]</code> means that <code>mi1</code> (cached in this pkgimage) depends on <code>external_targets[idxs1]</code>; <code>mi2</code> depends on <code>external_targets[idxs2]</code>, and so on.</p><ul><li><code>filesize</code></li></ul><p>: The total size of the cache file.</p><ul><li><code>cachesizes</code></li></ul><p>: Sizes of the individual sections. See <a href="#PkgCacheInspector.PkgCacheSizes"><code>PkgCacheSizes</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/timholy/PkgCacheInspector.jl/blob/6552676a84f81b43a1be3736484edd8fd160406e/src/PkgCacheInspector.jl#L88">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="PkgCacheInspector.PkgCacheSizes" href="#PkgCacheInspector.PkgCacheSizes"><code>PkgCacheInspector.PkgCacheSizes</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct PkgCacheSizes</code></pre><p>Stores the sizes of different "sections" of the pkgimage. The main section is the package image itself. However, reconstructing a pkgimage for use requires auxillary data, like the addresses of internal pointers that need to be modified to account for the actual base address into which the pkgimage was loaded. Each form of auxillary data gets stored in distinct sections.</p><ul><li><code>sysdata</code></li></ul><p>: Size of the image. This is the portion of the file that gets returns by <code>info_cachefile</code>.</p><ul><li><code>isbitsdata</code></li></ul><p>: Size of the <code>const</code> internal data section (storing things not visible from Julia, like datatype layouts).</p><ul><li><code>symboldata</code></li></ul><p>: Size of the symbol section, for Symbols stored in the image.</p><ul><li><code>tagslist</code></li></ul><p>: Size of the GC tags section, holding references to objects that require special re-initialization for GC.</p><ul><li><code>reloclist</code></li></ul><p>: Size of the relocation-list section, holding references to within-image pointers that need to be offset by the actual base pointer upon reloading.</p><ul><li><code>gvarlist</code></li></ul><p>: Size of the "gvar" (global variable) list of LLVM-encoded objects.</p><ul><li><code>fptrlist</code></li></ul><p>: Size of the function-pointer list, referencing native code.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/timholy/PkgCacheInspector.jl/blob/6552676a84f81b43a1be3736484edd8fd160406e/src/PkgCacheInspector.jl#L12">source</a></section></article></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.23 on <span class="colophon-date" title="Monday 4 September 2023 19:22">Monday 4 September 2023</span>. Using Julia version 1.11.0-DEV.403.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
Oops, something went wrong.