perf: throughput_metrics_inc禁用原子操作,并改为inline
This commit is contained in:
@@ -58,7 +58,11 @@ struct packet_io_fs *packet_io_fs_create(const char *profile);
|
||||
void packet_io_fs_destory(struct packet_io_fs *handle);
|
||||
void packet_io_fs_dump(struct packet_io_fs *handle);
|
||||
|
||||
void throughput_metrics_inc(struct throughput_metrics *iterm, uint64_t n_pkts, uint64_t n_bytes);
|
||||
void inline throughput_metrics_inc(struct throughput_metrics *iterm, uint64_t n_pkts, uint64_t n_bytes)
|
||||
{
|
||||
iterm->n_bytes += n_bytes;
|
||||
iterm->n_pkts += n_pkts;
|
||||
}
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user