Repository navigation
Commit 7ffe1bd
xprof: name the type of each integer component parameter (#547)
A component parameter's type is declared in its `*_params.yaml`, but Ruby
has a single Integer type, so `BTValue.from_value()` has to guess which
`bt_value` to build: it picks unsigned above 2**63 and signed below it,
whatever the component actually expects.
That guess is wrong for the timeline's `offset`, declared
`integer_unsigned` and read into a `uint64_t`: every realistic value is
below 2**63, so it was sent as a signed value. metababel 1.1.4 generated
no type check, so it went unnoticed; 2.0.0 validates the type and rejects
it:
Bad value for command line argument 'offset' the value must be
'integer_unsigned'.
Both of THAPI's integer parameters now name the type their model
declares, through the `BTValue` passthrough `from_value()` already
offers. The tally's `display_name_max_size` is unchanged in behaviour --
signed is what the guess happened to pick -- but it no longer depends on
the guess being right.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 26a92c8 commit 7ffe1bd
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
239 | 241 | | |
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
245 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
246 | 250 | | |
247 | 251 | | |
248 | 252 | | |
249 | 253 | | |
250 | 254 | | |
251 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
252 | 258 | | |
253 | 259 | | |
254 | 260 | | |
| |||
0 commit comments