@@ -379,36 +379,6 @@ static inline bool test_time_stamp(u64 delta)
379
379
/* Max payload is BUF_PAGE_SIZE - header (8bytes) */
380
380
#define BUF_MAX_DATA_SIZE (BUF_PAGE_SIZE - (sizeof(u32) * 2))
381
381
382
- int ring_buffer_print_page_header (struct trace_seq * s )
383
- {
384
- struct buffer_data_page field ;
385
-
386
- trace_seq_printf (s , "\tfield: u64 timestamp;\t"
387
- "offset:0;\tsize:%u;\tsigned:%u;\n" ,
388
- (unsigned int )sizeof (field .time_stamp ),
389
- (unsigned int )is_signed_type (u64 ));
390
-
391
- trace_seq_printf (s , "\tfield: local_t commit;\t"
392
- "offset:%u;\tsize:%u;\tsigned:%u;\n" ,
393
- (unsigned int )offsetof(typeof (field ), commit ),
394
- (unsigned int )sizeof (field .commit ),
395
- (unsigned int )is_signed_type (long ));
396
-
397
- trace_seq_printf (s , "\tfield: int overwrite;\t"
398
- "offset:%u;\tsize:%u;\tsigned:%u;\n" ,
399
- (unsigned int )offsetof(typeof (field ), commit ),
400
- 1 ,
401
- (unsigned int )is_signed_type (long ));
402
-
403
- trace_seq_printf (s , "\tfield: char data;\t"
404
- "offset:%u;\tsize:%u;\tsigned:%u;\n" ,
405
- (unsigned int )offsetof(typeof (field ), data ),
406
- (unsigned int )BUF_PAGE_SIZE ,
407
- (unsigned int )is_signed_type (char ));
408
-
409
- return !trace_seq_has_overflowed (s );
410
- }
411
-
412
382
struct rb_irq_work {
413
383
struct irq_work work ;
414
384
wait_queue_head_t waiters ;
@@ -556,6 +526,36 @@ struct ring_buffer_iter {
556
526
int missed_events ;
557
527
};
558
528
529
+ int ring_buffer_print_page_header (struct trace_seq * s )
530
+ {
531
+ struct buffer_data_page field ;
532
+
533
+ trace_seq_printf (s , "\tfield: u64 timestamp;\t"
534
+ "offset:0;\tsize:%u;\tsigned:%u;\n" ,
535
+ (unsigned int )sizeof (field .time_stamp ),
536
+ (unsigned int )is_signed_type (u64 ));
537
+
538
+ trace_seq_printf (s , "\tfield: local_t commit;\t"
539
+ "offset:%u;\tsize:%u;\tsigned:%u;\n" ,
540
+ (unsigned int )offsetof(typeof (field ), commit ),
541
+ (unsigned int )sizeof (field .commit ),
542
+ (unsigned int )is_signed_type (long ));
543
+
544
+ trace_seq_printf (s , "\tfield: int overwrite;\t"
545
+ "offset:%u;\tsize:%u;\tsigned:%u;\n" ,
546
+ (unsigned int )offsetof(typeof (field ), commit ),
547
+ 1 ,
548
+ (unsigned int )is_signed_type (long ));
549
+
550
+ trace_seq_printf (s , "\tfield: char data;\t"
551
+ "offset:%u;\tsize:%u;\tsigned:%u;\n" ,
552
+ (unsigned int )offsetof(typeof (field ), data ),
553
+ (unsigned int )BUF_PAGE_SIZE ,
554
+ (unsigned int )is_signed_type (char ));
555
+
556
+ return !trace_seq_has_overflowed (s );
557
+ }
558
+
559
559
static inline void rb_time_read (rb_time_t * t , u64 * ret )
560
560
{
561
561
* ret = local64_read (& t -> time );
0 commit comments