On 2015-10-28 at 15:06 "'Davide Libenzi' via Akaros"
<[email protected]> wrote:
> Since the previous one has not been done yet, this is a cumulative
> one:
>
> https://github.com/brho/akaros/compare/master...dlibenzi:profiler_dev_v2
>
>
> The following changes since commit
> 6f3723cd8f883260a78fdf411911d7469464caa5:
>
> Update file-posix.c utest (2015-10-15 12:07:00 -0400)
>
> are available in the git repository at:
>
> [email protected]:dlibenzi/akaros profiler_dev_v2
>
> for you to fetch changes up to
> 6e40b75927c808dd945cb3ad0ee6e52a5a2dc495:
>
> Added simple netcat client for Akaros (2015-10-28 14:49:56 -0700)
Please run checkpatch on your patches before sending them in. A bunch
of these are false positives, but many are not.
In the meantime, I'll take a look at the actual code too.
Barret
my checkpatch output:
--------------------------------------------------------------------------
../patches/0001-Completely-restructured-profiler-code-cutting-all-th.patch
--------------------------------------------------------------------------
ERROR: space required after that ',' (ctx:VxV)
#86: FILE: kern/drivers/dev/kprof.c:406:
+ n = profiler_read(va,n);
^
ERROR: space required after that ',' (ctx:VxV)
#161: FILE: kern/include/profiler.h:15:
+int profiler_read(void *va,int);
^
ERROR: space required before the open parenthesis '('
#1233: FILE: kern/src/profiler.c:202:
+ for(core = 0; core < num_cores; core++) {
total: 3 errors, 0 warnings, 419 lines checked
../patches/0001-Completely-restructured-profiler-code-cutting-all-th.patch has
style problems, please review.
------------------------------------------------------
../patches/0002-Removed-unused-old-oprofile-code.patch
------------------------------------------------------
total: 0 errors, 0 warnings, 0 lines checked
../patches/0002-Removed-unused-old-oprofile-code.patch has no obvious style
problems and is ready for submission.
--------------------------------------------------------------------------
../patches/0003-Do-not-race-when-multiple-init-happen-at-the-same-ti.patch
--------------------------------------------------------------------------
ERROR: do not initialise statics to 0 or NULL
#41: FILE: kern/src/profiler.c:33:
+static int profiler_users = 0;
total: 1 errors, 0 warnings, 185 lines checked
../patches/0003-Do-not-race-when-multiple-init-happen-at-the-same-ti.patch has
style problems, please review.
--------------------------------------------------------------------------
../patches/0004-Added-struct-proc-pointer-to-base-of-the-executable-.patch
--------------------------------------------------------------------------
total: 0 errors, 0 warnings, 21 lines checked
../patches/0004-Added-struct-proc-pointer-to-base-of-the-executable-.patch has
no obvious style problems and is ready for submission.
--------------------------------------------------------------------
../patches/0005-Added-full-binary-path-into-the-proc-structure.patch
--------------------------------------------------------------------
total: 0 errors, 0 warnings, 233 lines checked
../patches/0005-Added-full-binary-path-into-the-proc-structure.patch has no
obvious style problems and is ready for submission.
----------------------------------------------------------------------
../patches/0006-Added-APIs-to-access-process-startup-information.patch
----------------------------------------------------------------------
total: 0 errors, 0 warnings, 46 lines checked
../patches/0006-Added-APIs-to-access-process-startup-information.patch has no
obvious style problems and is ready for submission.
--------------------------------------------------------------------------
../patches/0007-Added-API-to-retrieve-the-full-path-of-a-struct-dent.patch
--------------------------------------------------------------------------
total: 0 errors, 0 warnings, 72 lines checked
../patches/0007-Added-API-to-retrieve-the-full-path-of-a-struct-dent.patch has
no obvious style problems and is ready for submission.
--------------------------------------------------------------------------
../patches/0008-Extend-hash-enumeration-API-to-accept-an-opaque-poin.patch
--------------------------------------------------------------------------
total: 0 errors, 0 warnings, 106 lines checked
../patches/0008-Extend-hash-enumeration-API-to-accept-an-opaque-poin.patch has
no obvious style problems and is ready for submission.
--------------------------------------------------------------------------
../patches/0009-Added-API-to-retrieve-the-current-set-of-processes-o.patch
--------------------------------------------------------------------------
total: 0 errors, 0 warnings, 68 lines checked
../patches/0009-Added-API-to-retrieve-the-current-set-of-processes-o.patch has
no obvious style problems and is ready for submission.
------------------------------------------------------------------------
../patches/0010-Added-API-to-enumerate-the-VM-regions-of-a-process.patch
------------------------------------------------------------------------
total: 0 errors, 0 warnings, 27 lines checked
../patches/0010-Added-API-to-enumerate-the-VM-regions-of-a-process.patch has no
obvious style problems and is ready for submission.
--------------------------------------------------------------------------
../patches/0011-Added-generic-backtrace-functions-to-allow-backtrace.patch
--------------------------------------------------------------------------
total: 0 errors, 0 warnings, 100 lines checked
../patches/0011-Added-generic-backtrace-functions-to-allow-backtrace.patch has
no obvious style problems and is ready for submission.
---------------------------------------------------------------------
../patches/0012-Added-API-to-append-data-into-a-circular-buffer.patch
---------------------------------------------------------------------
WARNING: kfree(NULL) is safe and this check is probably not required
#108: FILE: kern/lib/circular_buffer.c:33:
+ if (cb->mem)
+ kfree(cb->mem);
total: 0 errors, 1 warnings, 169 lines checked
../patches/0012-Added-API-to-append-data-into-a-circular-buffer.patch has style
problems, please review.
--------------------------------------------------
../patches/0013-Implemented-the-new-profiler.patch
--------------------------------------------------
ERROR: space required after that ',' (ctx:VxV)
#320: FILE: kern/drivers/dev/kprof.c:56:
+ {".", {Kprofdirqid, 0, QTDIR},0,
DMDIR|0550},
^
WARNING: externs should be avoided in .c files
#329: FILE: kern/drivers/dev/kprof.c:65:
+extern int booting;
WARNING: kfree(NULL) is safe and this check is probably not required
#413: FILE: kern/drivers/dev/kprof.c:132:
+ if (kprof.pdata) {
+ kfree(kprof.pdata);
WARNING: Missing a blank line after declarations
#546: FILE: kern/drivers/dev/kprof.c:211:
+ int i;
+ ERRSTACK(1);
ERROR: spaces required around that ':' (ctx:VxW)
#615: FILE: kern/drivers/dev/kprof.c:264:
+ return kprof.pdata != NULL ? kprof.psize: profiler_size();
^
ERROR: space required before the open brace '{'
#646: FILE: kern/drivers/dev/kprof.c:291:
+ if (c->qid.type & QTDIR){
ERROR: "foo* const * bar" should be "foo * const *bar"
#816: FILE: kern/drivers/dev/kprof.c:420:
+ const char* const * cmds = profiler_configure_cmds();
ERROR: Macros with complex values should be enclosed in parentheses
#1191: FILE: kern/include/kdebug.h:51:
+#define trace_printx(args...) if (printx_on) trace_printk(TRUE, args)
ERROR: "foo* const *bar" should be "foo * const *bar"
#1242: FILE: kern/include/profiler.h:17:
+const char* const *profiler_configure_cmds(void);
WARNING: __packed is preferred over __attribute__((packed))
#1283: FILE: kern/include/ros/profiler_records.h:17:
+} __attribute__((packed));
WARNING: __packed is preferred over __attribute__((packed))
#1293: FILE: kern/include/ros/profiler_records.h:27:
+} __attribute__((packed));
WARNING: __packed is preferred over __attribute__((packed))
#1304: FILE: kern/include/ros/profiler_records.h:38:
+} __attribute__((packed));
WARNING: __packed is preferred over __attribute__((packed))
#1312: FILE: kern/include/ros/profiler_records.h:46:
+} __attribute__((packed));
ERROR: "foo* bar" should be "foo *bar"
#1335: FILE: kern/include/string.h:27:
+void *memchr(const void* mem, int chr, int len);
ERROR: do not initialise statics to 0 or NULL
#1433: FILE: kern/src/profiler.c:40:
+static int tracing = 0;
ERROR: "foo* bar" should be "foo *bar"
#1442: FILE: kern/src/profiler.c:50:
+static inline char* vb_encode_uint64(char* data, uint64_t n)
ERROR: "foo* bar" should be "foo *bar"
#1442: FILE: kern/src/profiler.c:50:
+static inline char* vb_encode_uint64(char* data, uint64_t n)
WARNING: kfree(NULL) is safe and this check is probably not required
#1743: FILE: kern/src/profiler.c:278:
+ if (profiler_percpu_ctx) {
+ kfree(profiler_percpu_ctx);
ERROR: else should follow close brace '}'
#1812: FILE: kern/src/profiler.c:330:
+ }
+ else
ERROR: "foo* const *bar" should be "foo * const *bar"
#1819: FILE: kern/src/profiler.c:336:
+const char* const *profiler_configure_cmds(void)
ERROR: spaces required around that ':' (ctx:VxW)
#1887: FILE: kern/src/profiler.c:387:
+ cpu_buf->tracing = onoff ? 1: -1;
^
ERROR: spaces required around that ':' (ctx:VxW)
#2001: FILE: kern/src/profiler.c:448:
+ return profiler_queue ? qlen(profiler_queue): 0;
^
ERROR: spaces required around that ':' (ctx:VxW)
#2007: FILE: kern/src/profiler.c:453:
+ return profiler_queue ? qread(profiler_queue, va, n): 0;
^
ERROR: "foo* bar" should be "foo *bar"
#2036: FILE: kern/src/string.c:121:
+memchr(const void* mem, int chr, int len)
total: 16 errors, 8 warnings, 1975 lines checked
../patches/0013-Implemented-the-new-profiler.patch has style problems, please
review.
--------------------------------------------------------------------------
../patches/0014-Enabled-prof-kptrace-collection-of-anything-which-go.patch
--------------------------------------------------------------------------
WARNING: externs should be avoided in .c files
#34: FILE: kern/drivers/dev/kprof.c:66:
+extern system_timing_t system_timing;
ERROR: space required after that ',' (ctx:VxV)
#64: FILE: kern/include/stdarg.h:13:
+#define va_copy(d,s) __builtin_va_copy(d,s)
^
ERROR: space required after that ',' (ctx:VxV)
#64: FILE: kern/include/stdarg.h:13:
+#define va_copy(d,s) __builtin_va_copy(d,s)
^
total: 2 errors, 1 warnings, 56 lines checked
../patches/0014-Enabled-prof-kptrace-collection-of-anything-which-go.patch has
style problems, please review.
---------------------------------------------------
../patches/0015-Added-kprof-to-perf-converter.patch
---------------------------------------------------
WARNING: line over 80 characters
#159: FILE: tools/profile/kprof2perf/kprof2perf.c:45:
+ fprintf(stderr, "%s: %d: Assertion failed: " #c "\n",
__FILE__, __LINE__); \
ERROR: do not initialise statics to 0 or NULL
#201: FILE: tools/profile/kprof2perf/kprof2perf.c:87:
+static int debug_level = 0;
ERROR: do not initialise statics to 0 or NULL
#204: FILE: tools/profile/kprof2perf/kprof2perf.c:90:
+static struct static_mmap64 *static_mmaps = NULL;
ERROR: "foo* bar" should be "foo *bar"
#211: FILE: tools/profile/kprof2perf/kprof2perf.c:97:
+static inline const char* vb_decode_uint64(const char* data, uint64_t *pval)
ERROR: "foo* bar" should be "foo *bar"
#211: FILE: tools/profile/kprof2perf/kprof2perf.c:97:
+static inline const char* vb_decode_uint64(const char* data, uint64_t *pval)
WARNING: line over 80 characters
#352: FILE: tools/profile/kprof2perf/kprof2perf.c:238:
+static char *mem_block_write(struct mem_block *mb, const void *data, size_t
size)
ERROR: spaces required around that ':' (ctx:VxW)
#373: FILE: tools/profile/kprof2perf/kprof2perf.c:259:
+ return (flags & MBWR_SOLID) ? (space >= size): (space > 0);
^
WARNING: line over 80 characters
#560: FILE: tools/profile/kprof2perf/kprof2perf.c:446:
+ struct proftype_kern_trace64 *rec = (struct proftype_kern_trace64 *)
pr->data;
WARNING: line over 80 characters
#583: FILE: tools/profile/kprof2perf/kprof2perf.c:469:
+ struct proftype_user_trace64 *rec = (struct proftype_user_trace64 *)
pr->data;
ERROR: "foo* bar" should be "foo *bar"
#619: FILE: tools/profile/kprof2perf/kprof2perf.c:505:
+ const uint64_t* ids, size_t
nids)
WARNING: please, no space before tabs
#890: FILE: tools/profile/kprof2perf/perf_format.h:85:
+^I * ^I{ u32^I^I^Ipid, tid; } && PERF_SAMPLE_TID$
WARNING: please, no space before tabs
#891: FILE: tools/profile/kprof2perf/perf_format.h:86:
+^I * ^I{ u64^I^I^Itime; } && PERF_SAMPLE_TIME$
WARNING: please, no space before tabs
#892: FILE: tools/profile/kprof2perf/perf_format.h:87:
+^I * ^I{ u64^I^I^Iid; } && PERF_SAMPLE_ID$
WARNING: please, no space before tabs
#893: FILE: tools/profile/kprof2perf/perf_format.h:88:
+^I * ^I{ u64^I^I^Istream_id;} && PERF_SAMPLE_STREAM_ID$
WARNING: please, no space before tabs
#894: FILE: tools/profile/kprof2perf/perf_format.h:89:
+^I * ^I{ u32^I^I^Icpu, res; } && PERF_SAMPLE_CPU$
WARNING: please, no space before tabs
#924: FILE: tools/profile/kprof2perf/perf_format.h:119:
+^I * ^Istruct sample_id^I^Isample_id;$
WARNING: please, no space before tabs
#935: FILE: tools/profile/kprof2perf/perf_format.h:130:
+^I * ^Istruct sample_id^I^Isample_id;$
WARNING: please, no space before tabs
#946: FILE: tools/profile/kprof2perf/perf_format.h:141:
+^I * ^Istruct sample_id^I^Isample_id;$
WARNING: please, no space before tabs
#957: FILE: tools/profile/kprof2perf/perf_format.h:152:
+^I * ^Istruct sample_id^I^Isample_id;$
WARNING: please, no space before tabs
#969: FILE: tools/profile/kprof2perf/perf_format.h:164:
+^I * ^Istruct sample_id^I^Isample_id;$
WARNING: please, no space before tabs
#980: FILE: tools/profile/kprof2perf/perf_format.h:175:
+^I * ^Istruct sample_id^I^Isample_id;$
WARNING: please, no space before tabs
#1027: FILE: tools/profile/kprof2perf/perf_format.h:222:
+^I * ^I{ u64^I^I^Iabi; # enum perf_sample_regs_abi$
WARNING: please, no space before tabs
#1028: FILE: tools/profile/kprof2perf/perf_format.h:223:
+^I * ^I u64^I^I^Iregs[weight(mask)]; } && PERF_SAMPLE_REGS_USER$
WARNING: please, no space before tabs
#1030: FILE: tools/profile/kprof2perf/perf_format.h:225:
+^I * ^I{ u64^I^I^Isize;$
WARNING: please, no space before tabs
#1031: FILE: tools/profile/kprof2perf/perf_format.h:226:
+^I * ^I char^I^I^Idata[size];$
WARNING: please, no space before tabs
#1032: FILE: tools/profile/kprof2perf/perf_format.h:227:
+^I * ^I u64^I^I^Idyn_size; } && PERF_SAMPLE_STACK_USER$
WARNING: please, no space before tabs
#1059: FILE: tools/profile/kprof2perf/perf_format.h:254:
+^I * ^Istruct sample_id^I^Isample_id;$
WARNING: __packed is preferred over __attribute__((packed))
#1223: FILE: tools/profile/kprof2perf/perf_format.h:418:
+} __attribute__((packed));
WARNING: __packed is preferred over __attribute__((packed))
#1249: FILE: tools/profile/kprof2perf/perf_format.h:444:
+} __attribute__((packed));
WARNING: __packed is preferred over __attribute__((packed))
#1254: FILE: tools/profile/kprof2perf/perf_format.h:449:
+} __attribute__((packed));
WARNING: __packed is preferred over __attribute__((packed))
#1295: FILE: tools/profile/kprof2perf/perf_format.h:490:
+} __attribute__((packed));
WARNING: __packed is preferred over __attribute__((packed))
#1307: FILE: tools/profile/kprof2perf/perf_format.h:502:
+} __attribute__((packed));
WARNING: __packed is preferred over __attribute__((packed))
#1316: FILE: tools/profile/kprof2perf/perf_format.h:511:
+} __attribute__((packed));
WARNING: __packed is preferred over __attribute__((packed))
#1333: FILE: tools/profile/kprof2perf/perf_format.h:528:
+} __attribute__((packed));
total: 6 errors, 28 warnings, 1291 lines checked
../patches/0015-Added-kprof-to-perf-converter.patch has style problems, please
review.
--------------------------------------------------------------------------
../patches/0016-Added-patch-to-Linux-perf-to-allow-it-to-work-with-A.patch
--------------------------------------------------------------------------
ERROR: trailing whitespace
#33: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:14:
+ $
ERROR: trailing whitespace
#37: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:18:
+ $
ERROR: trailing whitespace
#45: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:26:
+ $
ERROR: trailing whitespace
#51: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:32:
+ $
ERROR: trailing whitespace
#98: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:79:
+ $
ERROR: trailing whitespace
#102: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:83:
+ $
ERROR: trailing whitespace
#104: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:85:
+ $
ERROR: trailing whitespace
#116: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:97:
+ $
ERROR: trailing whitespace
#127: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:108:
+ $
ERROR: trailing whitespace
#133: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:114:
+ $
ERROR: trailing whitespace
#144: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:125:
+ $
ERROR: trailing whitespace
#149: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:130:
+ $
ERROR: trailing whitespace
#165: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:146:
+ $
ERROR: trailing whitespace
#167: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:148:
+ $
ERROR: trailing whitespace
#173: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:154:
+ $
ERROR: trailing whitespace
#177: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:158:
+ $
ERROR: trailing whitespace
#183: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:164:
+ $
ERROR: trailing whitespace
#188: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:169:
+ $
ERROR: trailing whitespace
#192: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:173:
+ $
ERROR: trailing whitespace
#212: FILE: tools/profile/kprof2perf/perf_patches/perf_patch.diff:193:
+ $
total: 20 errors, 0 warnings, 201 lines checked
NOTE: Whitespace errors detected.
You may wish to use scripts/cleanpatch or scripts/cleanfile
../patches/0016-Added-patch-to-Linux-perf-to-allow-it-to-work-with-A.patch has
style problems, please review.
-----------------------------------------------------------
../patches/0017-Added-simple-netcat-client-for-Akaros.patch
-----------------------------------------------------------
total: 0 errors, 0 warnings, 157 lines checked
../patches/0017-Added-simple-netcat-client-for-Akaros.patch has no obvious
style problems and is ready for submission.
--------------------------------------------------------------
../patches/0018-Removed-lingering-error-string-variables.patch
--------------------------------------------------------------
total: 0 errors, 0 warnings, 49 lines checked
../patches/0018-Removed-lingering-error-string-variables.patch has no obvious
style problems and is ready for submission.
--------------------------------------------------------------
../patches/0019-Added-test-case-for-circular-buffer-code.patch
--------------------------------------------------------------
WARNING: please write a paragraph that describes the config symbol fully
#22: FILE: kern/src/ktest/Kconfig.postboot:120:
+config TEST_circular_buffer
total: 0 errors, 1 warnings, 110 lines checked
../patches/0019-Added-test-case-for-circular-buffer-code.patch has style
problems, please review.
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
--
You received this message because you are subscribed to the Google Groups
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.