Commit Graph

169 Commits

Author SHA1 Message Date
Dean Lee 3a11061dce OmxEncoder: set s->of to nullptr after close (#19814)
old-commit-hash: a5be02c2c75ef3e25779f69323a585c41ee15d07
2021-01-19 14:28:03 -08:00
Adeeb Shihadeh 5362097b37 fix loggerd after bootlog split (#19840)
* fix loggerd after bootlog split

* logger handles that

* unused

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2e64049ea4996af6bcd6fc1ff9338f5e20a5b393
2021-01-19 14:27:19 -08:00
Dean Lee 57b1b4c456 loggerd: split bootlog to a separate program (#19831)
* bootlog

* blank lines

* move file_exists to util.h

* src = ['loggerd.cc']

* log_init_data

* Revert "src = ['loggerd.cc']"

This reverts commit 18a587023d75b3a3a54f1ceaf9cb31a51640a067.

* add bootlog to .gitignore

* use s->has_qlog instead of true

* add blank lines & remove extern C
old-commit-hash: f973c56a3695525442ac6c3e89c644b27cbeb384
2021-01-19 12:16:12 -08:00
Willem Melching 8a187ec406 Linux tombstones: add stacktrace and upload (#19737)
* Add stacktrace to tombstones

* make sentry output prettier

* Refactor

* Generate upload filename

* Actually move file

* Fix spaces

* copy and upload

* dont delete just yet

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: f3db94a0c480bc12df98ec679a2f84833e134ee3
2021-01-18 13:29:01 +01:00
Dean Lee 92c11baefb loggerd: make sure to print one statistics every 1000 times (#19803)
old-commit-hash: d085adb9ecd939467b2f7ac8db65aab8b906d250
2021-01-17 15:50:13 -08:00
Dean Lee 339cb7b353 OmxEncoder: use std::vector to keep buffer (#19807)
old-commit-hash: e04cecd169629e72b66408abf9a7f1dfc1517a89
2021-01-17 15:48:06 -08:00
Dean Lee 603a21c1f4 loggerd: do not LOGW twice when logger.part == 0 (#19795)
* fix LOGW

* space
old-commit-hash: caf87c25dd98a346d9024fe18507db6eaf7c584d
2021-01-16 18:34:11 -08:00
Dean Lee 9eb6648ec5 OmxEncoder: use macro to check error (#19785)
old-commit-hash: 0592c326ed4fceac1bdc347118c3fa7380b6bd00
2021-01-16 12:43:59 -08:00
Willem Melching a04de5683e RecordFront remove ifdef (#19773)
old-commit-hash: 10790304c9882d726962e2b801c7810939b2c144
2021-01-15 13:21:39 -08:00
Adeeb Shihadeh eaa1489093 loggerd: another rotation test (#19742)
* another rotation test

* make encoder test fast

* fix pc

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 5221450f2da5aee400bfbf764e5acdea878a585a
2021-01-12 19:40:57 -08:00
Adeeb Shihadeh 65a624db68 Loggerd for PC (#19730)
old-commit-hash: 92e4f0487315fc623f54a864ba489cf2102ad085
2021-01-12 16:28:22 -08:00
Adeeb Shihadeh 9909060b4d Video Encoder abstraction (#19729)
old-commit-hash: a1c7f19fe46fe79d84543a9388f4b131fc42051b
2021-01-12 00:03:31 -08:00
Adeeb Shihadeh 47cc09f413 loggerd: fix double encoder open (#19703)
* fix double encoder open/close

* simplify rotation

* clean up

* cleanup

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 87e8ef1fca00e35291414f05cc4a2a90237ba9f2
2021-01-11 19:48:50 -08:00
Dean Lee 99a831dd5c replace std::this_thread::sleep_for with util::sleep_fo (#19717)
old-commit-hash: 72bb55247cb82d9a1517b516dab535b9502864c4
2021-01-11 11:59:48 +01:00
Dean Lee 4c1919f41e merge utilpp.h into util.h (#19710)
old-commit-hash: 595830135bb79c8b23eb8339ae768ca7b6a822f8
2021-01-10 14:57:32 -08:00
Adeeb Shihadeh 2a55e4f193 loggerd: fix use after free and memory leaks (#19695)
* fix use after free and memory leaks

* cleanup

* fix typo

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 6b0890f128d4ae3d56bb7c3f90267e38fc4e878b
2021-01-08 15:39:14 -08:00
Willem Melching 3f950832b9 VisionIPC 2.0 (#19641)
* Squashed vipc

* Update release files

* Remove else

* add visionipc to release files

* use poller in vipc receive

* opencl framework instead of lib on macos

* Fix camera webcam

* Fix opencl on mac in ui

* more webcam fixes

* typo in ui sconsfile

* Use cur_yuv_buf

* visionbuf c++ class

* Camera qcom was still using visionbuf_allocate

* Turn loggerd back on

* fix snapshot

* No build needed

* update test camerad

* no more release callback

* make encoder c++

* Revert "no more release callback"

This reverts commit e5707b07002fee665d0483d90713154efc2d70d4.

* fix exit handlers

* No need to check errno

* move release callback call

* s/VIPCBufExtra/VisionIpcBufExtra/g

* use non blocking connect

* ui use non blocking connect

* Lower condition variable wait time

* Snapshot cleanup

* bump cereal

* bump cereal
old-commit-hash: fb496c692a9ebdcda15069a8d4eb95734b587d68
2021-01-08 14:54:25 +01:00
Adeeb Shihadeh 1c2560352c loggerd cleanup (#19668)
old-commit-hash: 206d072bb4df0187b97c808f0a0478cbb9223976
2021-01-07 23:08:40 -08:00
Adeeb Shihadeh 0d895ad82a loggerd tests (#19671)
old-commit-hash: af81190cfcf96201f59b0461cc3fdd80cf8651a3
2021-01-06 19:18:35 -08:00
Adeeb Shihadeh 84255f7c0d fix race condition with encoder thread
old-commit-hash: e3d2f0c88cd04a2292ff4d90e74f38e147225d0c
2021-01-05 23:09:46 -08:00
Dean Lee 5e557ed96d common exit handler (#19661)
* common signal handle

* fix typo

* rename to ExitHandler

* remove include signal.h

* remove include csignal

* rename variable exit to v

* rebase master
old-commit-hash: 86fe2d1697531bebdf5d0d83609e91ed4006f54b
2021-01-05 20:19:53 -08:00
Adeeb Shihadeh 0fdc9af349 tici loggerd fixes (#19622)
* fix encoder exit when encoder is uninitialized

* cleanup

* more cleanup

* more cleanup

* little more

* ptr

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 54679cea585d1f65a6d8051cf338cb04f8a12319
2021-01-05 16:35:05 -08:00
Dean Lee bbfb751d69 Replace usleep with util::sleep_for (#19643)
* replace usleep with sleep_for

* sleep microseconds

* sleep nanoseconds

* Trigger Build
old-commit-hash: c1cf0882bd4e0fce5e1a581536f6a0e7afb640e6
2021-01-04 18:03:11 +01:00
Dean Lee f71bf83946 refactor qlog_counter (#19626)
old-commit-hash: 041fbbf7259a62e375d900f2eece309782b52411
2021-01-04 11:33:35 +01:00
Adeeb Shihadeh c64a8356fe move to github container registry + CI speedup (#19621)
old-commit-hash: 59d7c5e64ac3c8666c54c3443f912e4e0db92eb9
2020-12-31 14:57:01 -08:00
Adeeb Shihadeh 5bbe4f3d52 manager tests + make all processes exit cleanly (#19595)
* manager tests

* logcatd exits cleanly

* sigint

* boardd

* multiple dbus connections hangs for some reason

* clocksd proclogd

* network type from thermal

* fix tests

* fix android logcatd

* fix mac

* fix mac proclogd

* move on device athena tests

* build first

* build first

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: ffa7e0cbdb0859751685caae1321d3ccf732fed9
2020-12-29 22:32:03 -08:00
Adeeb Shihadeh b950cab874 HW abstraction layer (#19530)
* start hw refactor

* move that

* pins

* put that back
old-commit-hash: 8674b023bab2b44405139ceec5785a389f837682
2020-12-16 21:30:23 -08:00
Adeeb Shihadeh d5ad6237cf Revert "Handle python-dbus not installed"
This reverts commit fd22f01b1f21005846bef211851d17f602a7c600.

old-commit-hash: a2c6fdd14ce9ef1dfa59db6de91ebf863920d381
2020-12-15 20:29:24 -08:00
ZwX1616 1f99fdfc50 qcom2 init hevc tier correctly (#19496)
* qcom2 init tier correctly

* need to cast

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 1c21fc100d1fcc784805d94585c040ce3d1f3658
2020-12-14 16:24:49 -08:00
Willem Melching d47396f4da Handle python-dbus not installed
old-commit-hash: 25054cdc0538a0324b7f7c1bcc9d6166291b4e10
2020-12-14 15:04:17 +01:00
Comma Device 4728ad22b0 add LOGW
old-commit-hash: 44bedaa73b12bd79e77f4ba15965ecff3566a6d9
2020-12-11 21:12:51 -08:00
HoverB_SN_11 4020fc5aca Revert "simplify"
cannot simplify.

old-commit-hash: c6d68d5552ffd9840810a60906e48b622b4b8288
2020-12-09 02:13:27 +00:00
ZwX1616 4a064db213 Fix random encoder lockups (#2707)
* gbk

* surrrely not

* finalize

* such nuance, such nuisance

* this is done automatically

* add back

* give back 0

* simplify

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: d25cc6f6241140648b3737afbda51dae310a3bfc
2020-12-08 16:12:55 -08:00
Adeeb Shihadeh 9044cba60a remove raw logger (#2719)
* remove raw logger

* no raw_clips

* only remove raw clips

* cleanup
old-commit-hash: 56146d84ce43deb1afbe4b0b77438d1e9f8a4965
2020-12-08 15:23:06 -08:00
Willem Melching c790bb3c99 Set correct HW type in initData (#2685)
* set hw types

* dont use c++ filesystem
old-commit-hash: e7c182b0da097ab108c97da346d482b4f83b08c9
2020-12-03 17:27:12 +01:00
ZwX1616 165be65c7c fix loggerd unittest
old-commit-hash: 8d986c82d801ccdd78641a584ed54c638cb136e3
2020-11-22 15:40:51 -08:00
George Hotz 6b32f79ae6 New settings for governors, +30% memory bandwidth (#2590)
* new settings for governors, +30% memory bandwidth

* CPU waste is better

* warm up frame_drop

* optional CORE arg for rtshield

* back off priorities of processes not critical to driving

* if it doesn't drive, it's not realtime

* err, resource. this should have been included

* reverse order to not spike

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 917eff8c30895e85943ec0a8c735e91088dbda85
2020-11-20 19:25:12 -08:00
ZwX1616 deab0f86aa tici front/wide encodeIdx msgs (#2564)
* different msgs

* also add timestamps

* keep impatient log, remove the other

* meaningless
old-commit-hash: f244b7c7e156cd109be13a68ba1096dc2d25f3d0
2020-11-19 16:12:02 -08:00
ZwX1616 6b238ea78d remove duplicate enc_idx logging (#2562)
old-commit-hash: e113a1270292130ea3e7ef07a05b59aeb98c5ce7
2020-11-18 16:02:19 -08:00
ZwX1616 7f85b498be stop pc from spamming logs (#2544)
old-commit-hash: cf21720e1ae451286e6fd26fd6192d55914afa41
2020-11-13 16:26:30 -08:00
Adeeb Shihadeh d5990d0ef7 only qcom
old-commit-hash: d5a8444d6c9457bffbf929fe9314dfd210cf9e94
2020-11-12 16:19:28 -08:00
Adeeb Shihadeh ada81dda94 remove old loggerd priority
old-commit-hash: e88775a224502667be18bbedc655fa647ae83bd9
2020-11-08 15:44:04 -08:00
Adeeb Shihadeh 035ee027ff give loggerd min rt priority
old-commit-hash: 8f44e695835edbba79b913607d73f7735df060eb
2020-11-08 15:42:08 -08:00
Adeeb Shihadeh a4f4f1d828 Log last 1000 lines of tmux output in bootlog (#2149)
* log last 1000 lines of tmux output in bootlog

* add to bootlog

* fix tmux capture
old-commit-hash: 6b4957cba10985507c5ba2337ee08b6392f86ddb
2020-10-20 21:07:12 -07:00
Willem Melching 651d4ce031 --std=c++17 (#2330)
* switch to c++17

* more 17

* 1z

* use std::clamp

* Fix types in clamp

* bump submodules

* bump laika

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 339d1967cb1e8ca73aeb1f0066a23b0933706ae5
2020-10-17 13:33:12 -07:00
Comma Device 3d5e2004c3 fix encoder build
old-commit-hash: 4e2f9d915f34be5c1e27531ee3040d8e5ddf9e19
2020-10-15 11:23:42 +00:00
Willem Melching 498ecbdf3c Params refactor, simplified (#2300)
* always c++

* Create C++ params class

* get works

* tests hang now

* passes tests

* cleanup string formatting

* handle interrupt in blocking read

* fix memory leak

* remove unused constructor

* Use delete_db_value directly

* Rename put -> write_db_value

* filename cleanup

* no semicolons in cython

* Update common/SConscript

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* add std::string version of delete_db_value

* This is handled

* cleanup encoding

* Add clear method to clear all

* add persistent params

* fix android build

* Should be called clear_all

* only import params when needed

* set params path on manager import

* recusrively create directories

* Fix function order

* cleanup mkdirp

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2e182e5c574ea1468678b5fd8d0597e34ed5898d
2020-10-13 16:23:23 +02:00
Willem Melching a331861873 Remove czmq part 1 (#2332)
* remove czmq

* remove streaming mode from loggerd

* Add include for usleep
old-commit-hash: a4ccfcffe8247bf467bddfb0e6c5b3eb8851e21a
2020-10-13 16:01:07 +02:00
Adeeb Shihadeh de4c543e63 remove hotspot exceptions in uploader (#2319)
* remove hotspot exceptions

* skip net check while onroad
old-commit-hash: ee37d03c1ffa76d91d7085c2eb9ca2ce762ee647
2020-10-12 13:12:01 -07:00
Willem Melching 5b91f74549 fix loggerd rotate (#2291)
old-commit-hash: b682ebc022959b86e12a106af7bb614737e78c77
2020-10-07 16:59:32 -07:00