MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | #include <driver_info.h> |
| 3 | |
| 4 | mixed driver_info(int what) |
| 5 | |
| 6 | DESCRIPTION |
| 7 | Returns some internal information about the driver. |
| 8 | The argument <what> determines which information is returned. |
| 9 | |
| 10 | It can be either a configuration option as given to |
| 11 | configure_driver() or one of the following options: |
| 12 | |
| 13 | |
| 14 | |
| 15 | Driver Environment: |
| 16 | |
| 17 | <what> == DI_BOOT_TIME: |
| 18 | The time() when the driver was started. |
| 19 | |
| 20 | |
| 21 | |
| 22 | LPC Runtime status: |
| 23 | |
| 24 | <what> == DI_CURRENT_RUNTIME_LIMITS: |
| 25 | Return an array with the current runtime limits. |
| 26 | The entries in the returned array are: |
| 27 | |
| 28 | int[LIMIT_EVAL]: the max number of eval costs |
| 29 | int[LIMIT_ARRAY]: the max number of array entries |
| 30 | int[LIMIT_MAPPING_SIZE]: the max number of mapping values |
| 31 | int[LIMIT_MAPPING_KEYS]: the max number of mapping entries |
| 32 | (LIMIT_MAPPING is an alias for LIMIT_MAPPING_KEYS) |
| 33 | int[LIMIT_BYTE]: the max number of bytes handled with |
| 34 | one read_bytes()/write_bytes() call. |
| 35 | int[LIMIT_FILE]: the max number of bytes handled with |
| 36 | one read_file()/write_file() call. |
| 37 | int[LIMIT_CALLOUTS]: the number of callouts at one time. |
| 38 | int[LIMIT_COST]: how to account the current cost. |
| 39 | int[LIMIT_MEMROY]: the max. number of bytes which can be |
| 40 | _additionally_ allocated/used |
| 41 | _per top-level execution thread_ |
| 42 | |
| 43 | For all limits except LIMIT_COST a limit of '0' aka LIMIT_UNLIMITED |
| 44 | means 'no limit'. |
| 45 | |
| 46 | The value for LIMIT_COST has these meanings: |
| 47 | |
| 48 | value > 0: the execution will cost minimum(<value>, actual cost) . |
| 49 | value = 0: if the current LIMIT_EVAL is larger than the calling |
| 50 | LIMIT_EVAL, the evaluation will cost only 10; otherwise |
| 51 | the full cost will be accounted. |
| 52 | value < 0: (-value)% of the current evaluation cost will be |
| 53 | accounted; -100 obviously means 'full cost'. |
| 54 | |
| 55 | <what> == DI_EVAL_NUMBER: |
| 56 | Return the current evaluation number. |
| 57 | The number is incremented for each top-level call. Top-level |
| 58 | calls are initiated by the driver, usually in reaction to an |
| 59 | external event: |
| 60 | - commands (added by add_action) |
| 61 | - heart_beat, reset, clean_up |
| 62 | - calls from call_out or input_to |
| 63 | - master applies triggered by external events |
| 64 | - calls of driver hooks in reaction to external events |
| 65 | - send_erq callbacks |
| 66 | - logon in interactives |
| 67 | |
| 68 | The number can be used to detect cases where the same code is |
| 69 | executed twice in the same top level evaluation (say, heart_beat), |
| 70 | and also for time stamps for ordering some events. |
| 71 | |
| 72 | Please note that the counter may overflow, especially on 32 bit |
| 73 | systems. As a result, it can also be negative. |
| 74 | |
| 75 | |
| 76 | |
| 77 | Network configuration: |
| 78 | |
| 79 | <what> == DI_MUD_PORTS: |
| 80 | Returns an array with all open ports, which the driver |
| 81 | listens for player connections on. |
| 82 | |
| 83 | <what> == DI_UDP_PORT: |
| 84 | Returns the port number of the UDP socket. |
| 85 | |
| 86 | |
| 87 | |
| 88 | Memory management: |
| 89 | |
| 90 | <what> == DI_MEMORY_RESERVE_USER: |
| 91 | Current size of the user memory reserve. |
| 92 | The user memory reserve is allocated at startup and is used |
| 93 | when the driver runs out of memory. |
| 94 | |
| 95 | <what> == DI_MEMORY_RESERVE_MASTER: |
| 96 | Current size of the master memory reserve. |
| 97 | The master memory reserve is allocated at startup and is used |
| 98 | when the driver runs out of memory while executing master |
| 99 | code. |
| 100 | |
| 101 | <what> == DI_MEMORY_RESERVE_SYSTEM: |
| 102 | Current size of the system memory reserve. |
| 103 | The system memory reserve is allocated at startup and is used |
| 104 | when the driver runs out of memory while executing internal |
| 105 | operations. |
| 106 | |
| 107 | |
| 108 | |
| 109 | Traces: |
| 110 | |
| 111 | <what> == DI_TRACE_CURRENT: |
| 112 | Returns the current stack trace in array form. |
| 113 | |
| 114 | If the array has more than one entries, the first entry is 0 or |
| 115 | the name of the object with the heartbeat which started the |
| 116 | current thread; all following entries describe the call stack |
| 117 | starting with the topmost function called. |
| 118 | |
| 119 | All call entries are arrays themselves with the following elements: |
| 120 | |
| 121 | int[TRACE_TYPE]: The type of the call frame: |
| 122 | TRACE_TYPE_SYMBOL (0): a function symbol (shouldn't happen). |
| 123 | TRACE_TYPE_SEFUN (1): a simul-efun. |
| 124 | TRACE_TYPE_EFUN (2): an efun closure. |
| 125 | TRACE_TYPE_LAMBDA (3): a lambda closure. |
| 126 | TRACE_TYPE_LFUN (4): a normal lfun. |
| 127 | |
| 128 | mixed[TRACE_NAME]: The 'name' of the called frame: |
| 129 | _TYPE_EFUN: either the name of the efun, or the code of |
| 130 | the instruction for operator closures |
| 131 | _TYPE_LAMBDA: the numeric lambda identifier. |
| 132 | _TYPE_LFUN: the name of the lfun. |
| 133 | |
| 134 | string[TRACE_PROGRAM]: The (file)name of the program holding |
| 135 | the code. |
| 136 | |
| 137 | string[TRACE_OBJECT]: The name of the object for which the code |
| 138 | was executed. |
| 139 | int[TRACE_LOC]: |
| 140 | _TYPE_LAMBDA: current program offset from the start of the |
| 141 | closure code. |
| 142 | _TYPE_LFUN: the line number. |
| 143 | |
| 144 | <what> == DI_TRACE_CURRENT_DEPTH: |
| 145 | Return the current number of frames on the control stack |
| 146 | (recursion depth). |
| 147 | |
| 148 | <what> == DI_TRACE_CURRENT_AS_STRING: |
| 149 | Returns the current stack trace as a string. |
| 150 | |
| 151 | <what> == DI_TRACE_LAST_ERROR: |
| 152 | Returns the stack trace of the last error in array form |
| 153 | (same format as DI_TRACE_CURRENT). Stack traces of errors |
| 154 | before the last GC might not be available anymore. |
| 155 | |
| 156 | <what> == DI_TRACE_LAST_ERROR_AS_STRING: |
| 157 | Returns the stack trace of the last error as a string. |
| 158 | |
| 159 | <what> == DI_TRACE_LAST_UNCAUGHT_ERROR: |
| 160 | Returns the stack trace of the last uncaught error in array form |
| 161 | (same format as DI_TRACE_CURRENT). Stack traces of errors |
| 162 | before the last GC might not be available anymore. |
| 163 | |
| 164 | <what> == DI_TRACE_LAST_UNCAUGHT_ERROR_AS_STRING: |
| 165 | Returns the stack trace of the last uncaught error as a string. |
| 166 | |
| 167 | |
| 168 | |
| 169 | LPC Runtime statistics: |
| 170 | |
| 171 | <what> == DI_NUM_FUNCTION_NAME_CALLS: |
| 172 | Number of function calls by name (like call_other). |
| 173 | |
| 174 | <what> == DI_NUM_FUNCTION_NAME_CALL_HITS: |
| 175 | Function calls by name are cached (to accelerate |
| 176 | lookup of the corresponding program code). |
| 177 | This returns the number of cache hits. |
| 178 | |
| 179 | <what> == DI_NUM_FUNCTION_NAME_CALL_MISSES: |
| 180 | The number of function call cache misses. |
| 181 | |
| 182 | <what> == DI_NUM_OBJECTS_LAST_PROCESSED: |
| 183 | Number of listed objects processed in the last backend cycle. |
| 184 | |
| 185 | <what> == DI_NUM_HEARTBEAT_TOTAL_CYCLES: |
| 186 | Total number of heart_beats cycles so far. |
| 187 | |
| 188 | <what> == DI_NUM_HEARTBEAT_ACTIVE_CYCLES: |
| 189 | Number of active heart_beat cycles executed so far |
| 190 | (ie. cycles in which at least one heart_beat() function |
| 191 | was called). |
| 192 | |
| 193 | <what> == DI_NUM_HEARTBEATS_LAST_PROCESSED: |
| 194 | Number of heart_beats calls in the last backend cycle |
| 195 | |
| 196 | <what> == DI_NUM_STRING_TABLE_STRINGS_ADDED: |
| 197 | Number of distinct strings added to the string table so far. |
| 198 | |
| 199 | <what> == DI_NUM_STRING_TABLE_STRINGS_REMOVED: |
| 200 | Number of distinct strings removed from the string table so far. |
| 201 | |
| 202 | <what> == DI_NUM_STRING_TABLE_LOOKUPS_BY_VALUE: |
| 203 | Number of string searches by value. |
| 204 | |
| 205 | <what> == DI_NUM_STRING_TABLE_LOOKUPS_BY_INDEX: |
| 206 | Number of string searches by address. |
| 207 | |
| 208 | <what> == DI_NUM_STRING_TABLE_LOOKUP_STEPS_BY_VALUE: |
| 209 | Number of lookup steps needed for string searches by value. |
| 210 | |
| 211 | <what> == DI_NUM_STRING_TABLE_LOOKUP_STEPS_BY_INDEX: |
| 212 | Number of lookup steps needed for string searches by address. |
| 213 | |
| 214 | <what> == DI_NUM_STRING_TABLE_HITS_BY_VALUE: |
| 215 | Number of successful lookups of strings by value. |
| 216 | |
| 217 | <what> == DI_NUM_STRING_TABLE_HITS_BY_INDEX: |
| 218 | Number of successful lookups of strings by address. |
| 219 | |
| 220 | <what> == DI_NUM_STRING_TABLE_COLLISIONS: |
| 221 | Number of distinct strings added to an existing hash chain so far. |
| 222 | |
| 223 | <what> == DI_NUM_REGEX_LOOKUPS: |
| 224 | Number of requests for new regexps. |
| 225 | |
| 226 | <what> == DI_NUM_REGEX_LOOKUP_HITS: |
| 227 | Number of requested regexps found in the table. |
| 228 | |
| 229 | <what> == DI_NUM_REGEX_LOOKUP_MISSES: |
| 230 | Number of requested regexps not found in the table. |
| 231 | |
| 232 | <what> == DI_NUM_REGEX_LOOKUP_COLLISIONS: |
| 233 | Number of requested new regexps which collided with a cached one. |
| 234 | |
| 235 | |
| 236 | |
| 237 | Network statistics: |
| 238 | |
| 239 | <what> == DI_NUM_MESSAGES_OUT: |
| 240 | Number of messages sent to a player. |
| 241 | |
| 242 | <what> == DI_NUM_PACKETS_OUT: |
| 243 | Number of packets sent to a player. |
| 244 | |
| 245 | <what> == DI_NUM_PACKETS_IN: |
| 246 | Number of packets received from a player. |
| 247 | |
| 248 | <what> == DI_SIZE_PACKETS_OUT: |
| 249 | Number of bytes sent to a player. |
| 250 | |
| 251 | <what> == DI_SIZE_PACKETS_IN: |
| 252 | Number of bytes received from a player. |
| 253 | |
| 254 | |
| 255 | |
| 256 | Load: |
| 257 | |
| 258 | <what> == DI_LOAD_AVERAGE_COMMANDS: |
| 259 | A float value that shows the number of executed player commands |
| 260 | per second. |
| 261 | |
| 262 | <what> == DI_LOAD_AVERAGE_LINES: |
| 263 | A float value that shows the number of compiled code lines |
| 264 | per second. |
| 265 | |
| 266 | <what> == DI_LOAD_AVERAGE_PROCESSED_OBJECTS: |
| 267 | A float value that shows the average number of objects processed |
| 268 | each backend cycle. |
| 269 | |
| 270 | <what> == DI_LOAD_AVERAGE_PROCESSED_OBJECTS_RELATIVE: |
| 271 | Average number of objects processed each cycle, expressed |
| 272 | as percentage (0..1.0) of the number of present objects. |
| 273 | |
| 274 | <what> == DI_LOAD_AVERAGE_PROCESSED_HEARTBEATS_RELATIVE: |
| 275 | Average number of heart_beats called each cycle, expressed |
| 276 | as fraction (0..1.0) of the number of active heartbeats. |
| 277 | |
| 278 | |
| 279 | |
| 280 | Memory use statistics: |
| 281 | |
| 282 | <what> == DI_NUM_ACTIONS: |
| 283 | Number of allocated actions. |
| 284 | |
| 285 | <what> == DI_NUM_CALLOUTS: |
| 286 | Number of pending call_outs. |
| 287 | |
| 288 | <what> == DI_NUM_HEARTBEATS: |
| 289 | Number of objects with a heartbeat. |
| 290 | |
| 291 | <what> == DI_NUM_SHADOWS: |
| 292 | Number of allocated shadows. |
| 293 | |
| 294 | <what> == DI_NUM_OBJECTS: |
| 295 | Number of objects. |
| 296 | |
| 297 | <what> == DI_NUM_OBJECTS_SWAPPED: |
| 298 | Number of objects that are swapped-out. |
| 299 | |
| 300 | <what> == DI_NUM_OBJECTS_IN_LIST: |
| 301 | Number of objects in the object list |
| 302 | (i.e. not destructed objects). |
| 303 | |
| 304 | <what> == DI_NUM_OBJECTS_IN_TABLE: |
| 305 | Number of objects in the object table. |
| 306 | |
| 307 | <what> == DI_NUM_OBJECTS_DESTRUCTED: |
| 308 | Number of destructed, but still referenced objects. |
| 309 | (Not counting DI_NUM_OBJECTS_NEWLY_DESTRUCTED). |
| 310 | |
| 311 | <what> == DI_NUM_OBJECTS_NEWLY_DESTRUCTED: |
| 312 | Number of newly destructed objects (ie. objects destructed |
| 313 | in this execution thread, that will really be destroyed in |
| 314 | the next backend cycle). |
| 315 | |
| 316 | <what> == DI_NUM_OBJECT_TABLE_SLOTS: |
| 317 | Number of hash slots provided by the object table. |
| 318 | |
| 319 | <what> == DI_NUM_PROGS: |
| 320 | Size occupied by the object table. |
| 321 | |
| 322 | <what> == DI_NUM_PROGS_SWAPPED: |
| 323 | Number of swapped-out program blocks |
| 324 | |
| 325 | <what> == DI_NUM_PROGS_UNSWAPPED: |
| 326 | Number of programs that were swapped-out, are now swapped-in, |
| 327 | but still have allocated space in the swap file. |
| 328 | |
| 329 | <what> == DI_NUM_ARRAYS: |
| 330 | Number of currently existing arrays. |
| 331 | |
| 332 | <what> == DI_NUM_MAPPINGS: |
| 333 | Number of currently existing mappings. |
| 334 | |
| 335 | <what> == DI_NUM_MAPPINGS_CLEAN: |
| 336 | Number of clean mappings (mappings without a hash part). |
| 337 | |
| 338 | <what> == DI_NUM_MAPPINGS_HASH: |
| 339 | Number of hash mappings. |
| 340 | |
| 341 | <what> == DI_NUM_MAPPINGS_HYBRID: |
| 342 | Number of hybrid mappings (mappings that have a |
| 343 | condensed and hash part). |
| 344 | |
| 345 | <what> == DI_NUM_STRUCTS: |
| 346 | Number of currently existing structs. |
| 347 | |
| 348 | <what> == DI_NUM_STRUCT_TYPES: |
| 349 | Number of currently existing struct types. |
| 350 | |
| 351 | <what> == DI_NUM_VIRTUAL_STRINGS: |
| 352 | Number of currently existing virtual strings |
| 353 | (identical strings are counted separately). |
| 354 | |
| 355 | <what> == DI_NUM_STRINGS: |
| 356 | Number of real strings (identical strings |
| 357 | are counted once). |
| 358 | |
| 359 | <what> == DI_NUM_STRINGS_TABLED: |
| 360 | Number of directly tabled strings. |
| 361 | |
| 362 | <what> == DI_NUM_STRINGS_UNTABLED: |
| 363 | Number of untabled strings. |
| 364 | |
| 365 | <what> == DI_NUM_STRING_TABLE_SLOTS: |
| 366 | Number of hash slots in the string table. |
| 367 | |
| 368 | <what> == DI_NUM_STRING_TABLE_SLOTS_USED: |
| 369 | Number of hash chains in the string table. |
| 370 | |
| 371 | <what> == DI_NUM_REGEX: |
| 372 | Number of cached regular expressions. |
| 373 | |
| 374 | <what> == DI_NUM_REGEX_TABLE_SLOTS: |
| 375 | Number of slots in the regexp cache table. |
| 376 | |
| 377 | <what> == DI_SIZE_ACTIONS: |
| 378 | Total size of allocated actions. |
| 379 | |
| 380 | <what> == DI_SIZE_CALLOUTS: |
| 381 | Total size of pending call_outs. |
| 382 | |
| 383 | <what> == DI_SIZE_HEARTBEATS: |
| 384 | Total size of the heart_beat list. |
| 385 | |
| 386 | <what> == DI_SIZE_SHADOWS: |
| 387 | Total size of allocated shadows. |
| 388 | |
| 389 | <what> == DI_SIZE_OBJECTS: |
| 390 | Total size of objects (not counting the size of the values |
| 391 | of their variables). |
| 392 | |
| 393 | <what> == DI_SIZE_OBJECTS_SWAPPED: |
| 394 | Total size of swapped-out variable blocks. |
| 395 | |
| 396 | <what> == DI_SIZE_OBJECT_TABLE: |
| 397 | Size occupied by the object table. |
| 398 | |
| 399 | <what> == DI_SIZE_PROGS: |
| 400 | Total size of all programs. |
| 401 | |
| 402 | <what> == DI_SIZE_PROGS_SWAPPED: |
| 403 | Total size of swapped-out program blocks |
| 404 | |
| 405 | <what> == DI_SIZE_PROGS_UNSWAPPED: |
| 406 | Total size of unswapped program blocks |
| 407 | |
| 408 | <what> == DI_SIZE_ARRAYS: |
| 409 | Total size of all arrays (not counting additional sizes |
| 410 | of array element values). |
| 411 | |
| 412 | <what> == DI_SIZE_MAPPINGS: |
| 413 | Total size of all mapping (not counting additional sizes |
| 414 | of contained values). |
| 415 | |
| 416 | <what> == DI_SIZE_STRUCTS: |
| 417 | Total size of all structs (not counting additional sizes |
| 418 | of contained values). |
| 419 | |
| 420 | <what> == DI_SIZE_STRUCT_TYPES: |
| 421 | Total size of all struct type definitions. |
| 422 | |
| 423 | <what> == DI_SIZE_STRINGS: |
| 424 | Total size of all strings. |
| 425 | |
| 426 | <what> == DI_SIZE_STRINGS_TABLED: |
| 427 | Total size of all tabled strings. |
| 428 | |
| 429 | <what> == DI_SIZE_STRINGS_UNTABLED: |
| 430 | Total size of all untabled strings. |
| 431 | |
| 432 | <what> == DI_SIZE_STRING_TABLE: |
| 433 | Size of the string table structure itself. |
| 434 | |
| 435 | <what> == DI_SIZE_STRING_OVERHEAD: |
| 436 | Size of the overhead per string (compared to a raw string). |
| 437 | |
| 438 | <what> == DI_SIZE_REGEX: |
| 439 | Total size of all cached regular expressions. |
| 440 | |
| 441 | <what> == DI_SIZE_BUFFER_FILE: |
| 442 | The size of the memory buffer for file operations. |
| 443 | |
| 444 | <what> == DI_SIZE_BUFFER_SWAP: |
| 445 | The size of the memory buffer for the swap file. |
| 446 | |
| 447 | |
| 448 | |
| 449 | Memory swapper statistics: |
| 450 | |
| 451 | <what> == DI_NUM_SWAP_BLOCKS: |
| 452 | Number of blocks in the swap file. |
| 453 | |
| 454 | <what> == DI_NUM_SWAP_BLOCKS_FREE: |
| 455 | Number of free blocks in the swap file. |
| 456 | |
| 457 | <what> == DI_NUM_SWAP_BLOCKS_REUSE_LOOKUPS: |
| 458 | Number of searches for blocks to reuse in the swap file. |
| 459 | |
| 460 | <what> == DI_NUM_SWAP_BLOCKS_REUSE_LOOKUP_STEPS: |
| 461 | Total number of lookup steps in searches for blocks |
| 462 | to reuse in the swap file. |
| 463 | |
| 464 | <what> == DI_NUM_SWAP_BLOCKS_FREE_LOOKUPS: |
| 465 | Number of searches for blocks to free in the swap file. |
| 466 | |
| 467 | <what> == DI_NUM_SWAP_BLOCKS_FREE_LOOKUP_STEPS: |
| 468 | Total number of lookup steps in searches for blocks |
| 469 | to free in the swap file. |
| 470 | |
| 471 | <what> == DI_SIZE_SWAP_BLOCKS: |
| 472 | Size of the swap file. |
| 473 | |
| 474 | <what> == DI_SIZE_SWAP_BLOCKS_FREE: |
| 475 | Size of free blocks in the swap file. |
| 476 | |
| 477 | <what> == DI_SIZE_SWAP_BLOCKS_REUSED: |
| 478 | Total reused space in the swap file. |
| 479 | |
| 480 | <what> == DI_SWAP_RECYCLE_PHASE: |
| 481 | True if the swapper is currently recycling free block. |
| 482 | |
| 483 | |
| 484 | |
| 485 | Memory allocator statistics: |
| 486 | |
| 487 | <what> == DI_MEMORY_ALLOCATOR_NAME: |
| 488 | The name of the allocator: "sysmalloc", "smalloc", "slaballoc |
| 489 | |
| 490 | <what> == DI_NUM_SYS_ALLOCATED_BLOCKS: |
| 491 | Number of memory blocks requested from the operating system. |
| 492 | |
| 493 | <what> == DI_NUM_LARGE_BLOCKS_ALLOCATED: |
| 494 | Number of large allocated blocks. |
| 495 | (With smalloc: The large allocated blocks include |
| 496 | the small chunk blocks.) |
| 497 | |
| 498 | <what> == DI_NUM_LARGE_BLOCKS_FREE: |
| 499 | Number of large free blocks. |
| 500 | |
| 501 | <what> == DI_NUM_LARGE_BLOCKS_WASTE: |
| 502 | Number of unusable large memory fragments. |
| 503 | |
| 504 | <what> == DI_NUM_SMALL_BLOCKS_ALLOCATED: |
| 505 | Number of small allocated blocks. |
| 506 | |
| 507 | <what> == DI_NUM_SMALL_BLOCKS_FREE: |
| 508 | Number of small free blocks. |
| 509 | |
| 510 | <what> == DI_NUM_SMALL_BLOCKS_WASTE: |
| 511 | Number of unusably small memory fragments. |
| 512 | |
| 513 | <what> == DI_NUM_SMALL_BLOCK_CHUNKS: |
| 514 | Number of small chunk/slab blocks. |
| 515 | (That are large blocks that are used as a |
| 516 | base for small blocks.) |
| 517 | |
| 518 | <what> == DI_NUM_UNMANAGED_BLOCKS: |
| 519 | Number of unmanaged (non-GC-able) allocations. |
| 520 | |
| 521 | <what> == DI_NUM_FREE_BLOCKS_AVL_NODES: |
| 522 | Number of AVL nodes used to manage the large free |
| 523 | blocks. This value might go away again. |
| 524 | |
| 525 | <what> == DI_SIZE_SYS_ALLOCATED_BLOCKS: |
| 526 | Total size of memory requested from the operating system. |
| 527 | |
| 528 | <what> == DI_SIZE_LARGE_BLOCKS_ALLOCATED: |
| 529 | Total size of large allocated blocks. |
| 530 | |
| 531 | <what> == DI_SIZE_LARGE_BLOCKS_FREE: |
| 532 | Total size of large free blocks. |
| 533 | |
| 534 | <what> == DI_SIZE_LARGE_BLOCKS_WASTE: |
| 535 | Total size of unusable large memory fragments. |
| 536 | |
| 537 | <what> == DI_SIZE_LARGE_BLOCK_OVERHEAD: |
| 538 | The overhead of every large block allocation. |
| 539 | |
| 540 | <what> == DI_SIZE_SMALL_BLOCKS_ALLOCATED: |
| 541 | Total size of small allocated blocks. |
| 542 | |
| 543 | <what> == DI_SIZE_SMALL_BLOCKS_FREE: |
| 544 | Total size of small free blocks. |
| 545 | |
| 546 | <what> == DI_SIZE_SMALL_BLOCKS_WASTE: |
| 547 | Total size of unusably small memory fragments. |
| 548 | |
| 549 | <what> == DI_SIZE_SMALL_BLOCK_OVERHEAD: |
| 550 | The overhead of every small block allocation. |
| 551 | |
| 552 | <what> == DI_SIZE_SMALL_BLOCK_CHUNKS: |
| 553 | Total size of small chunk/slab blocks. |
| 554 | |
| 555 | <what> == DI_SIZE_UNMANAGED_BLOCKS: |
| 556 | Total size of unmanaged (non-GC-able) allocations. |
| 557 | |
| 558 | <what> == DI_SIZE_MEMORY_USED: |
| 559 | The amount of memory currently allocated from the allocator. |
| 560 | |
| 561 | <what> == DI_SIZE_MEMORY_UNUSED: |
| 562 | The amount of memory allocated from the system, but |
| 563 | not used by the driver. |
| 564 | |
| 565 | <what> == DI_SIZE_MEMORY_OVERHEAD: |
| 566 | Amount of memory used for the management of the memory. |
| 567 | |
| 568 | <what> == DI_NUM_INCREMENT_SIZE_CALLS: |
| 569 | Number of requests to increase the size of a memory block. |
| 570 | |
| 571 | <what> == DI_NUM_INCREMENT_SIZE_CALL_SUCCESSES: |
| 572 | Number of successful requests to increase the |
| 573 | size of a memory block. |
| 574 | |
| 575 | <what> == DI_SIZE_INCREMENT_SIZE_CALL_DIFFS: |
| 576 | Total size of additionally allocated memory by |
| 577 | increasing already allocated memory blocks. |
| 578 | |
| 579 | <what> == DI_NUM_REPLACEMENT_MALLOC_CALLS: |
| 580 | Number of allocations done through the |
| 581 | clib functions (if supported by the allocator). |
| 582 | |
| 583 | <what> == DI_SIZE_REPLACEMENT_MALLOC_CALLS: |
| 584 | Total size of allocations done through the |
| 585 | clib functions (if supported by the allocator). |
| 586 | |
| 587 | <what> == DI_NUM_MEMORY_DEFRAGMENTATION_CALLS_FULL: |
| 588 | Total number of requests to defragment all small memory chunks. |
| 589 | |
| 590 | <what> == DI_NUM_MEMORY_DEFRAGMENTATION_CALLS_TARGETED: |
| 591 | Total number of requests to defragment small memory chunks |
| 592 | for a desired size. |
| 593 | |
| 594 | <what> == DI_NUM_MEMORY_DEFRAGMENTATION_CALL_TARGET_HITS: |
| 595 | Total number of successful requests to defragment small |
| 596 | memory chunks for a desired size. |
| 597 | |
| 598 | <what> == DI_NUM_MEMORY_DEFRAGMENTATION_BLOCKS_INSPECTED: |
| 599 | Number of blocks inspected during defragmentations. |
| 600 | |
| 601 | <what> == DI_NUM_MEMORY_DEFRAGMENTATION_BLOCKS_MERGED: |
| 602 | Number of blocks merged during defragmentations. |
| 603 | |
| 604 | <what> == DI_NUM_MEMORY_DEFRAGMENTATION_BLOCKS_RESULTING: |
| 605 | Number of defragmented blocks (ie. merge results). |
| 606 | |
| 607 | <what> == DI_MEMORY_EXTENDED_STATISTICS: |
| 608 | If the driver was compiled with extended memory statistics, |
| 609 | they are returned in this entry; if the driver was compiled |
| 610 | without the statistics, 0 is returned. |
| 611 | |
| 612 | The array contains NUM+2 entries, where NUM is the number |
| 613 | of distinct small block sizes. Entry [NUM] describes the |
| 614 | statistics of oversized small blocks (smalloc) resp. for |
| 615 | all slabs (slaballoc), entry [NUM+1] summarizes all large |
| 616 | blocks. Each entry is an array of these fields: |
| 617 | |
| 618 | int DIM_ES_MAX_ALLOC: |
| 619 | Max number of allocated blocks of this size. |
| 620 | |
| 621 | int DIM_ES_CUR_ALLOC: |
| 622 | Current number of allocated blocks of this size. |
| 623 | |
| 624 | int DIM_ES_MAX_FREE: |
| 625 | Max number of allocated blocks of this size. |
| 626 | |
| 627 | int DIM_ES_CUR_FREE: |
| 628 | Current number of allocated blocks of this size. |
| 629 | |
| 630 | float DIM_ES_AVG_XALLOC: |
| 631 | Number of explicit allocation requests per |
| 632 | second. |
| 633 | |
| 634 | float DIM_ES_AVG_XFREE: |
| 635 | Number of explicit deallocation requests per |
| 636 | second. |
| 637 | |
| 638 | int DIM_ES_FULL_SLABS: |
| 639 | Number of fully used slabs (slaballoc only). |
| 640 | |
| 641 | int DIM_ES_FREE_SLABS: |
| 642 | Number of fully free slabs (slaballoc only). |
| 643 | |
| 644 | int DIM_ES_TOTAL_SLABS: |
| 645 | Total number of slabs: partially used, fully used |
| 646 | and fully free (slaballoc only). |
| 647 | |
| 648 | The allocation/deallocation-per-second statistics do |
| 649 | not cover internal shuffling of the freelists. |
| 650 | |
| 651 | The slab statistics (entry [NUM], slaballoc only) shows |
| 652 | in the AVG statistics the frequence with which slabs were |
| 653 | allocated from resp. returned to the large memory pool. |
| 654 | |
| 655 | |
| 656 | |
| 657 | Status texts: |
| 658 | |
| 659 | <what> == DI_STATUS_TEXT_MEMORY: |
| 660 | A printable string containing information about |
| 661 | the memory usage. |
| 662 | |
| 663 | <what> == DI_STATUS_TEXT_TABLES: |
| 664 | A printable string containing information about |
| 665 | the LPC runtime. |
| 666 | |
| 667 | <what> == DI_STATUS_TEXT_SWAP: |
| 668 | A printable string containing information about |
| 669 | the swap system. |
| 670 | |
| 671 | <what> == DI_STATUS_TEXT_MALLOC: |
| 672 | A printable string containing information about |
| 673 | memory allocations. |
| 674 | |
| 675 | <what> == DI_STATUS_TEXT_MALLOC_EXTENDED: |
| 676 | A printable strings with extended memory statistics |
| 677 | (if the driver was compiled with them). |
| 678 | |
| 679 | |
| 680 | HISTORY |
| 681 | Introduced in LDMud 3.5.0. |
| 682 | |
| 683 | SEE ALSO |
| 684 | configure_driver(E), object_info(E), interactive_info(E), |
| 685 | dump_driver_info(E) |