Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
28a6f89e
Commit
28a6f89e
authored
Mar 11, 2026
by
Tobias Koppers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add println! logging before all Mmap::map calls to log file path and size
Co-Authored-By:
Claude
<
noreply@anthropic.com
>
parent
41ed440b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
sst_inspect.rs
turbopack/crates/turbo-persistence/src/bin/sst_inspect.rs
+5
-0
db.rs
turbopack/crates/turbo-persistence/src/db.rs
+6
-0
static_sorted_file.rs
turbopack/crates/turbo-persistence/src/static_sorted_file.rs
+6
-0
No files found.
turbopack/crates/turbo-persistence/src/bin/sst_inspect.rs
View file @
28a6f89e
...
@@ -391,6 +391,11 @@ fn analyze_sst_file(db_path: &Path, info: &SstInfo) -> Result<SstStats> {
...
@@ -391,6 +391,11 @@ fn analyze_sst_file(db_path: &Path, info: &SstInfo) -> Result<SstStats> {
let
file
=
File
::
open
(
&
path
)
.with_context
(||
format!
(
"Failed to open {}"
,
filename
))
?
;
let
file
=
File
::
open
(
&
path
)
.with_context
(||
format!
(
"Failed to open {}"
,
filename
))
?
;
let
file_size
=
file
.metadata
()
?
.len
();
let
file_size
=
file
.metadata
()
?
.len
();
println!
(
"mmap: mapping file {} ({} bytes)"
,
path
.display
(),
file_size
);
let
mmap
=
unsafe
{
Mmap
::
map
(
&
file
)
?
};
let
mmap
=
unsafe
{
Mmap
::
map
(
&
file
)
?
};
advise_mmap_for_persistence
(
&
mmap
)
?
;
advise_mmap_for_persistence
(
&
mmap
)
?
;
...
...
turbopack/crates/turbo-persistence/src/db.rs
View file @
28a6f89e
...
@@ -405,6 +405,12 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
...
@@ -405,6 +405,12 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
let
path
=
self
.path
.join
(
format!
(
"{seq:08}.blob"
));
let
path
=
self
.path
.join
(
format!
(
"{seq:08}.blob"
));
let
file
=
File
::
open
(
&
path
)
let
file
=
File
::
open
(
&
path
)
.with_context
(||
format!
(
"Failed to open blob file {}"
,
path
.display
()))
?
;
.with_context
(||
format!
(
"Failed to open blob file {}"
,
path
.display
()))
?
;
let
file_size
=
file
.metadata
()
.map
(|
m
|
m
.len
())
.unwrap_or
(
0
);
println!
(
"mmap: mapping file {} ({} bytes)"
,
path
.display
(),
file_size
);
let
mmap
=
unsafe
{
Mmap
::
map
(
&
file
)
}
.with_context
(||
{
let
mmap
=
unsafe
{
Mmap
::
map
(
&
file
)
}
.with_context
(||
{
format!
(
format!
(
"Failed to mmap blob file {} ({} bytes)"
,
"Failed to mmap blob file {} ({} bytes)"
,
...
...
turbopack/crates/turbo-persistence/src/static_sorted_file.rs
View file @
28a6f89e
...
@@ -184,6 +184,12 @@ impl StaticSortedFile {
...
@@ -184,6 +184,12 @@ impl StaticSortedFile {
)
->
Result
<
Self
>
{
)
->
Result
<
Self
>
{
let
file
=
File
::
open
(
&
path
)
let
file
=
File
::
open
(
&
path
)
.with_context
(||
format!
(
"Failed to open SST file {}"
,
path
.display
()))
?
;
.with_context
(||
format!
(
"Failed to open SST file {}"
,
path
.display
()))
?
;
let
file_size
=
file
.metadata
()
.map
(|
m
|
m
.len
())
.unwrap_or
(
0
);
println!
(
"mmap: mapping file {} ({} bytes)"
,
path
.display
(),
file_size
);
let
mmap
=
unsafe
{
Mmap
::
map
(
&
file
)
}
.with_context
(||
{
let
mmap
=
unsafe
{
Mmap
::
map
(
&
file
)
}
.with_context
(||
{
format!
(
format!
(
"Failed to mmap SST file {} ({} bytes)"
,
"Failed to mmap SST file {} ({} bytes)"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment