template <>
class WireServer
Defined at line 386 of file fidling/gen/sdk/fidl/fuchsia.memory.inspection/fuchsia.memory.inspection/cpp/fidl/fuchsia.memory.inspection/cpp/wire_messaging.h
Pure-virtual interface to be implemented by a server.
This interface uses typed channels (i.e. |::fidl::ClientEnd
<
::fuchsia_memory_inspection::Collector>|
and |::fidl::ServerEnd
<
::fuchsia_memory_inspection::Collector>|).
Public Methods
void CollectJsonStats (::fuchsia_memory_inspection::wire::CollectorCollectJsonStatsRequest * request, CollectJsonStatsCompleter::Sync & completer)
Writes to `socket` a JSON capture of the memory usage and the memory
bucket definition, as a well-formed UTF-8 string.
The socket is closed by the server after all the data is written into
it.
TODO(https://fxbug.dev/42073090): Document the schema of the JSON.
Sample output:
{"Capture":
{
"Time":28477260758625,
"Kernel":{
"total":1610612736,
"free":170565632,
"wired":67395584,
"total_heap":30904320,
"free_heap":1873728,
"vmo":1276194816,
"mmu":65294336,
"ipc":196608,
"other":61440
},
"Processes":[
["koid","name","vmos"],
[47325,"fonts.cm",[47353, ...]],
...
],
"VmoNames":["scudo:primary", ...],
"Vmos":[
["koid","name","parent_koid","committed_bytes","allocated_bytes"],
[47440,38,47437,4096,4096],
...
]
}
"Buckets":
[
{
"event_code": 29,
"name": "BlobfsInactive",
"process": "blobfs\\.cm",
"vmo": "inactive-blob-.*"
},
...
]
}
For size reasons:
- Processes and Vmos have an initial entry that contains the names of the the fields in
the rest of the entries.
- The names of the VMOs are an index into the VMONames array.
void CollectJsonStatsWithOptions (::fuchsia_memory_inspection::wire::CollectorCollectJsonStatsWithOptionsRequest * request, CollectJsonStatsWithOptionsCompleter::Sync & completer)
void WireServer ()
Defined at line 389 of file fidling/gen/sdk/fidl/fuchsia.memory.inspection/fuchsia.memory.inspection/cpp/fidl/fuchsia.memory.inspection/cpp/wire_messaging.h
Handler bind_handler (async_dispatcher_t * dispatcher)
|bind_handler| returns a handler that binds incoming connections to this
server implementation.
The returned handler borrows the server instance.
The server must outlive the provided |dispatcher|. Only after
the dispatcher is shutdown will it be safe to destroy the servers.
The server should not be moved.
void ~WireServer ()
Defined at line 390 of file fidling/gen/sdk/fidl/fuchsia.memory.inspection/fuchsia.memory.inspection/cpp/fidl/fuchsia.memory.inspection/cpp/wire_messaging.h