MCPcopy Create free account
hub / github.com/coreboot/coreboot / timestamp_print_entry

Function timestamp_print_entry

payloads/coreinfo/timestamps_module.c:110–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110static uint64_t timestamp_print_entry(char *buffer, size_t size, uint32_t *cur,
111 uint32_t id, uint64_t stamp, uint64_t prev_stamp)
112{
113 const char *name;
114 uint64_t step_time;
115
116 name = timestamp_name(id);
117 step_time = arch_convert_raw_ts_entry(stamp - prev_stamp);
118
119 *cur += snprintf(buffer + *cur, size, "%4d: %-45s", id, name);
120 *cur += snprintf(buffer + *cur, size, "%llu",
121 arch_convert_raw_ts_entry(stamp));
122 if (prev_stamp) {
123 *cur += snprintf(buffer + *cur, size, " (");
124 *cur += snprintf(buffer + *cur, size, "%llu", step_time);
125 *cur += snprintf(buffer + *cur, size, ")");
126 }
127 *cur += snprintf(buffer + *cur, size, "\n");
128
129 return step_time;
130}
131
132static int timestamps_module_init(void)
133{

Callers 1

timestamps_module_initFunction · 0.70

Calls 3

timestamp_nameFunction · 0.70
snprintfFunction · 0.50

Tested by

no test coverage detected