History

bpf: update perf event helper functions documentation

This commit updates documentation of the bpf_perf_event_output and bpf_perf_event_read helpers to match their implementation.

Teng Qin committed 9 years ago

Commit b7d3ed51 parent 41e9a802 files · +14 −8Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/bpf.h+7−4
@@ -313,8 +313,11 @@ union bpf_attr { · 312 unmodified lines
313313 * @flags: room for future extensions
314314 * Return: 0 on success or negative error
315315 *
316− * u64 bpf_perf_event_read(&map, index)
317− * Return: Number events read or error code
316+ * u64 bpf_perf_event_read(map, flags)
317+ * read perf event counter value
318+ * @map: pointer to perf_event_array map
319+ * @flags: index of event in the map or bitmask flags
320+ * Return: value of perf event counter read or error code
318321 *
319322 * int bpf_redirect(ifindex, flags)
320323 * redirect to another netdev
@@ -328,11 +331,11 @@ union bpf_attr { · 7 unmodified lines
328331 * @skb: pointer to skb
329332 * Return: realm if != 0
330333 *
331− * int bpf_perf_event_output(ctx, map, index, data, size)
334+ * int bpf_perf_event_output(ctx, map, flags, data, size)
332335 * output perf raw sample
333336 * @ctx: struct pt_regs*
334337 * @map: pointer to perf_event_array map
335− * @index: index of event in the map
338+ * @flags: index of event in the map or bitmask flags
336339 * @data: data on stack to be output as raw data
337340 * @size: size of data
338341 * Return: 0 on success or negative error