History

Merge branch 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf_counter: Report the cloning task as parent on perf_counter_fork() perf_counter: Fix an ipi-deadlock perf: Rework/fix the whole read vs group stuff perf_counter: Fix swcounter context invariance perf report: Don't show unresolved DSOs and symbols when -S/-d is used perf tools: Add a general option to enable raw sample records perf tools: Add a per tracepoint counter attribute to get raw sample perf_counter: Provide hw_perf_counter_setup_online() APIs perf list: Fix large list output by using the pager perf_counter, x86: Fix/improve apic fallback perf record: Add missing -C option support for specifying profile cpu perf tools: Fix dso__new handle() to handle deleted DSOs perf tools: Fix fallback to cplus_demangle() when bfd_demangle() is not available perf report: Show the tid too in -D perf record: Fix .tid and .pid fill-in when synthesizing events perf_counter, x86: Fix generic cache events on P6-mobile CPUs perf_counter, x86: Fix lapic printk message

Linus Torvalds committed 17 years ago

Commit 3493e842 parents 919aa96 94d5d1b11 files · +429 −190Browse files

Showing the changes to include (1 of 11 files). Show all

Unified · Split

include/linux/perf_counter.h+38−11
@@ -115,7 +115,7 @@ enum perf_counter_sample_format { · 114 unmodified lines
115115 PERF_SAMPLE_TID = 1U << 1,
116116 PERF_SAMPLE_TIME = 1U << 2,
117117 PERF_SAMPLE_ADDR = 1U << 3,
118− PERF_SAMPLE_GROUP = 1U << 4,
118+ PERF_SAMPLE_READ = 1U << 4,
119119 PERF_SAMPLE_CALLCHAIN = 1U << 5,
120120 PERF_SAMPLE_ID = 1U << 6,
121121 PERF_SAMPLE_CPU = 1U << 7,
@@ -127,16 +127,32 @@ enum perf_counter_sample_format { · 5 unmodified lines
127127 };
128128
129129 /*
130− * Bits that can be set in attr.read_format to request that
131− * reads on the counter should return the indicated quantities,
132− * in increasing order of bit value, after the counter value.
130+ * The format of the data returned by read() on a perf counter fd,
131+ * as specified by attr.read_format:
132+ *
133+ * struct read_format {
134+ * { u64 value;
135+ * { u64 time_enabled; } && PERF_FORMAT_ENABLED
136+ * { u64 time_running; } && PERF_FORMAT_RUNNING
137+ * { u64 id; } && PERF_FORMAT_ID
138+ * } && !PERF_FORMAT_GROUP
139+ *
140+ * { u64 nr;
141+ * { u64 time_enabled; } && PERF_FORMAT_ENABLED
142+ * { u64 time_running; } && PERF_FORMAT_RUNNING
143+ * { u64 value;
144+ * { u64 id; } && PERF_FORMAT_ID
145+ * } cntr[nr];
146+ * } && PERF_FORMAT_GROUP
147+ * };
133148 */
134149 enum perf_counter_read_format {
135150 PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0,
136151 PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1,
137152 PERF_FORMAT_ID = 1U << 2,
153+ PERF_FORMAT_GROUP = 1U << 3,
138154
139− PERF_FORMAT_MAX = 1U << 3, /* non-ABI */
155+ PERF_FORMAT_MAX = 1U << 4, /* non-ABI */
140156 };
141157
142158 #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */
@@ -343,10 +359,8 @@ enum perf_event_type { · 200 unmodified lines
343359 * struct {
344360 * struct perf_event_header header;
345361 * u32 pid, tid;
346− * u64 value;
347− * { u64 time_enabled; } && PERF_FORMAT_ENABLED
348− * { u64 time_running; } && PERF_FORMAT_RUNNING
349− * { u64 parent_id; } && PERF_FORMAT_ID
362+ *
363+ * struct read_format values;
350364 * };
351365 */
352366 PERF_EVENT_READ = 8,
@@ -364,11 +378,22 @@ enum perf_event_type { · 11 unmodified lines
364378 * { u32 cpu, res; } && PERF_SAMPLE_CPU
365379 * { u64 period; } && PERF_SAMPLE_PERIOD
366380 *
367− * { u64 nr;
368− * { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP
381+ * { struct read_format values; } && PERF_SAMPLE_READ
369382 *
370383 * { u64 nr,
371384 * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN
385+ *
386+ * #
387+ * # The RAW record below is opaque data wrt the ABI
388+ * #
389+ * # That is, the ABI doesn't make any promises wrt to
390+ * # the stability of its content, it may vary depending
391+ * # on event, hardware, kernel version and phase of
392+ * # the moon.
393+ * #
394+ * # In other words, PERF_SAMPLE_RAW contents are not an ABI.
395+ * #
396+ *
372397 * { u32 size;
373398 * char data[size];}&& PERF_SAMPLE_RAW
374399 * };
@@ -694,6 +719,8 @@ struct perf_sample_data { · 319 unmodified lines
694719
695720 extern int perf_counter_overflow(struct perf_counter *counter, int nmi,
696721 struct perf_sample_data *data);
722+extern void perf_counter_output(struct perf_counter *counter, int nmi,
723+ struct perf_sample_data *data);
697724
698725 /*
699726 * Return 1 for a software counter, 0 for a hardware counter

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t