Skip to content

Add rsrv logger for machine topology - #459

Open
elliottslaughter wants to merge 1 commit into
mainfrom
eslaught/rsrv-logger
Open

Add rsrv logger for machine topology#459
elliottslaughter wants to merge 1 commit into
mainfrom
eslaught/rsrv-logger

Conversation

@elliottslaughter

Copy link
Copy Markdown
Contributor

Fixes #458.

Adds a new -level rsrv=2 logger that replaces -ll:show_rsrv. Right now the old code paths are still in place, and this new code path works independently of the old flag. Use -level rsrv=2 OR -ll:show_rsrv, not both.

Alternatives/design decisions:

  • We could remove -ll:show_rsrv in favor of the new logger, possibly with an error message to users who attempt to use it, directing to the new syntax.
  • The logger currently prefixes only the first line, because we reuse the existing infrastructure for printing to a stream. If we wanted every line to be prefixed, we'd need to make deeper changes.

Output looks like:

$ ./examples/saxpy/saxpy -level rsrv=2
[0 - 1fb2b5e80]    0.000126 {2}{rsrv}: Topology {
  domain 0, memory size:68719476736 {
    core 0 { ids=<0> }
    core 1 { ids=<1> }
    core 2 { ids=<2> }
    core 3 { ids=<3> }
    core 4 { ids=<4> }
    core 5 { ids=<5> }
    core 6 { ids=<6> }
    core 7 { ids=<7> }
    core 8 { ids=<8> }
    core 9 { ids=<9> }
    core 10 { ids=<10> }
    core 11 { ids=<11> }
    core 12 { ids=<12> }
    core 13 { ids=<13> }
    core 14 { ids=<14> }
    core 15 { ids=<15> }
    core 16 { ids=<16> }
    core 17 { ids=<17> }
  }
}
CPU proc 1d00000000000001: allocated <0>
dedicated worker (generic) #1: allocated <1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17>
dedicated worker (generic) #2: allocated <1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17>
utility proc 1d00000000000000: allocated <1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17>

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@dba8345). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/realm/runtime_impl.cc 0.00% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #459   +/-   ##
=======================================
  Coverage        ?   29.99%           
=======================================
  Files           ?      196           
  Lines           ?    40906           
  Branches        ?    14801           
=======================================
  Hits            ?    12268           
  Misses          ?    28184           
  Partials        ?      454           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@lightsighter

Copy link
Copy Markdown
Contributor

Can we name it core_rsrv or something along those lines to avoid conflating it with actual Realm reservations and their loggers? I would be in favor of just removing the old flag to avoid building up cruft, but open to alternative opinions on that front. I don't think anyone keys off of -ll:show_rsrv enough to keep it around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send -ll:show_rsrv output to a logger

2 participants