@cryptotaxi247 / netdata-1 / commits / 2c826768d

cleanup FIXME tags (#4309)

Costa Tsaousis committed Sep 28, 2018 at 16:49 UTC 2c826768da768da3f913d7558a9e8b6c535ed337
12 files changed +28 -25
src/apps_plugin.c
+4 -4
@@ -1023,7 +1023,7 @@ static inline int read_proc_pid_status(struct pid_stat *p, void *ptr) {
1023 p->gid = proc_info->ki_groups[0];
1024 p->status_vmsize = proc_info->ki_size / 1024; // in kB
1025 p->status_vmrss = proc_info->ki_rssize * pagesize / 1024; // in kB
1026 - // FIXME: what about shared and swap memory on FreeBSD?
1026 + // TODO: what about shared and swap memory on FreeBSD?
1027 return 1;
1028 #else
1029 (void)ptr;
@@ -1578,13 +1578,13 @@ static inline int file_descriptor_find_or_add(const char *name, uint32_t hash) {
1578 else if(strcmp(t, "[timerfd]") == 0) type = FILETYPE_TIMERFD;
1579 else if(strcmp(t, "[signalfd]") == 0) type = FILETYPE_SIGNALFD;
1580 else {
1581 - debug_log("FIXME: unknown anonymous inode: %s", name);
1581 + debug_log("UNKNOWN anonymous inode: %s", name);
1582 type = FILETYPE_OTHER;
1583 }
1584 }
1585 else if(likely(strcmp(name, "inotify") == 0)) type = FILETYPE_INOTIFY;
1586 else {
1587 - debug_log("FIXME: cannot understand linkname: %s", name);
1587 + debug_log("UNKNOWN linkname: %s", name);
1588 type = FILETYPE_OTHER;
1589 }
1590
@@ -3049,7 +3049,7 @@ static void normalize_utilization(struct target *root) {
3049 // if(gtime_fix_ratio < 0.0) gtime_fix_ratio = 0.0;
3050 // if(cgtime_fix_ratio < 0.0) cgtime_fix_ratio = 0.0;
3051
3052 - // FIXME
3052 + // TODO
3053 // we use cpu time to normalize page faults
3054 // the problem is that to find the proper max values
3055 // for page faults we have to parse /proc/vmstat
src/backends.c
+1 -1
@@ -804,7 +804,7 @@ void *backends_main(void *ptr) {
804
805 if(unlikely(netdata_exit)) break;
806
807 - //fprintf(stderr, "\nBACKEND BEGIN:\n%s\nBACKEND END\n", buffer_tostring(b)); // FIXME
807 + //fprintf(stderr, "\nBACKEND BEGIN:\n%s\nBACKEND END\n", buffer_tostring(b));
808 //fprintf(stderr, "after = %lu, before = %lu\n", after, before);
809
810 // prepare for the next iteration
src/cgroup-network.c
+2 -2
@@ -217,8 +217,8 @@ int switch_namespace(const char *prefix, pid_t pid) {
217 // 2 passes - found it at nsenter source code
218 // this is related CLONE_NEWUSER functionality
219
220 - // FIXME: this code cannot switch user namespace
221 - // Fortunately, we don't need it.
220 + // This code cannot switch user namespace (it can all the other namespaces)
221 + // Fortunately, we don't need to switch user namespaces.
222
223 int pass, errors = 0;
224 for(pass = 0; pass < 2 ;pass++) {
src/plugin_nfacct.c
+2 -2
@@ -21,7 +21,7 @@ static inline size_t mnl_buffer_size() {
21 #define DO_NFSTAT 1
22
23 #define RRD_TYPE_NET_STAT_NETFILTER "netfilter"
24 -#define RRD_TYPE_NET_STAT_CONNTRACK "netlink" // FIXME: should be "conntrack" when merged with the /proc plugin
24 +#define RRD_TYPE_NET_STAT_CONNTRACK "netlink"
25
26 #include <linux/netfilter/nfnetlink_conntrack.h>
27
@@ -592,7 +592,7 @@ static void nfacct_cleanup() {
592 nfacct_root.buf = NULL;
593 nfacct_root.buf_size = 0;
594
595 - // FIXME: cleanup the metrics linked list
595 + // TODO: cleanup the metrics linked list
596 }
597
598 static int nfacct_callback(const struct nlmsghdr *nlh, void *data) {
src/plugin_tc.c
+5 -5
@@ -404,7 +404,7 @@ static inline void tc_device_commit(struct tc_device *d) {
404 rrdset_next(d->st_bytes);
405 if(unlikely(d->name_updated)) rrdset_set_name(d->st_bytes, d->name);
406
407 - // FIXME
407 + // TODO
408 // update the family
409 }
410
@@ -457,7 +457,7 @@ static inline void tc_device_commit(struct tc_device *d) {
457 rrdset_set_name(d->st_packets, name);
458 }
459
460 - // FIXME
460 + // TODO
461 // update the family
462 }
463
@@ -510,7 +510,7 @@ static inline void tc_device_commit(struct tc_device *d) {
510 rrdset_set_name(d->st_dropped, name);
511 }
512
513 - // FIXME
513 + // TODO
514 // update the family
515 }
516
@@ -563,7 +563,7 @@ static inline void tc_device_commit(struct tc_device *d) {
563 rrdset_set_name(d->st_tokens, name);
564 }
565
566 - // FIXME
566 + // TODO
567 // update the family
568 }
569
@@ -618,7 +618,7 @@ static inline void tc_device_commit(struct tc_device *d) {
618 rrdset_set_name(d->st_ctokens, name);
619 }
620
621 - // FIXME
621 + // TODO
622 // update the family
623 }
624
src/proc_stat.c
+2 -2
@@ -250,8 +250,8 @@ int do_proc_stat(int update_every, usec_t dt) {
250 family = "utilization";
251 priority = 1000;
252
253 - // FIXME: check for /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
254 - // FIXME: check for /sys/devices/system/cpu/cpu*/cpufreq/stats/time_in_state
253 + // TODO: check for /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
254 + // TODO: check for /sys/devices/system/cpu/cpu*/cpufreq/stats/time_in_state
255
256 char filename[FILENAME_MAX + 1];
257 struct stat stbuf;
src/rrdvar.c
+1 -1
@@ -110,7 +110,7 @@ inline RRDVAR *rrdvar_create_and_index(const char *scope, avl_tree_lock *tree, c
110 }
111
112 void rrdvar_free_remaining_variables(RRDHOST *host, avl_tree_lock *tree_lock) {
113 - // FIXME: this is not bullet proof - avl should support some means to destroy it
113 + // This is not bullet proof - avl should support some means to destroy it
114 // with a callback for each item already in the index
115
116 RRDVAR *rv, *last = NULL;
src/socket.c
+3 -1
@@ -1292,7 +1292,9 @@ static void poll_events_process(POLLJOB *p, POLLINFO *pi, struct pollfd *pf, sho
1292
1293 debug(D_POLLFD, "POLLFD: LISTENER: reading data from UDP slot %zu (fd %d)", i, fd);
1294
1295 - // FIXME: access_list is not applied to UDP
1295 + // TODO: access_list is not applied to UDP
1296 + // but checking the access list on every UDP packet will destroy
1297 + // performance, especially for statsd.
1298
1299 pf->events = 0;
1300 pi->rcv_callback(pi, &pf->events);
src/web_api_v1.c
+1 -1
@@ -827,7 +827,7 @@ inline int web_client_api_request_v1_registry(RRDHOST *host, struct web_client *
827
828 debug(D_WEB_CLIENT, "%llu: API v1 registry with URL '%s'", w->id, url);
829
830 - // FIXME
830 + // TODO
831 // The browser may send multiple cookies with our id
832
833 char *cookie = strstr(w->response.data->buffer, NETDATA_REGISTRY_COOKIE_NAME "=");
src/web_client.c
+1 -1
@@ -908,7 +908,7 @@ static inline HTTP_VALIDATION http_request_validate(struct web_client *w) {
908 *ue = ' ';
909
910 // copy the URL - we are going to overwrite parts of it
911 - // FIXME -- we should avoid it
911 + // TODO -- ideally we we should avoid copying buffers around
912 strncpyz(w->last_url, w->decoded_url, NETDATA_WEB_REQUEST_URL_SIZE);
913
914 w->header_parse_tries = 0;
web/dashboard.js
+4 -3
@@ -563,7 +563,7 @@ var NETDATA = window.NETDATA || {};
563 focus: false,
564 visibility: false,
565 chart_data_url: false,
566 - chart_errors: true, // FIXME: remember to set it to false before merging
566 + chart_errors: false, // remember to set it to false before merging
567 chart_timing: false,
568 chart_calls: false,
569 libraries: false,
@@ -1784,7 +1784,7 @@ var NETDATA = window.NETDATA || {};
1784 // ----------------------------------------------------------------------------------------------------------------
1785 // dimensions selection
1786
1787 - // FIXME
1787 + // TODO
1788 // move color assignment to dimensions, here
1789
1790 var dimensionStatus = function(parent, label, name_div, value_div, color) {
@@ -8967,7 +8967,8 @@ var NETDATA = window.NETDATA || {};
8967
8968 /*
8969 // cleanup old notifications with the same alarm_id as this one
8970 - // FIXME: it does not seem to work on any web browser!
8970 + // it does not seem to work on any web browser - so notifications cannot be removed
8971 +
8972 var len = NETDATA.alarms.notifications_shown.length;
8973 while(len--) {
8974 var n = NETDATA.alarms.notifications_shown[len];
web/index.html
+2 -2
@@ -1560,7 +1560,7 @@
1560
1561 // enrich the data structure returned by netdata
1562 // to reflect our menu system and content
1563 - // FIXME: this is a shame - we should fix charts naming (issue #807)
1563 + // TODO: this is a shame - we should fix charts naming (issue #807)
1564 function enrichChartData(chart) {
1565 var parts = chart.type.split('_');
1566 var tmp = parts[0];
@@ -4457,7 +4457,7 @@
4457 });
4458
4459 NETDATA.requiredJs.push({
4460 - url: NETDATA.serverStatic + 'dashboard_info.js?v20180926-3',
4460 + url: NETDATA.serverStatic + 'dashboard_info.js?v20180928-1',
4461 async: false,
4462 isAlreadyLoaded: function() { return false; }
4463 });