Commit Graph

96 Commits

Author SHA1 Message Date
Nekotekina
d37e770497 Shut up all channels on exit at some point
Some object are getting destroyed.
Makes valgrind more quiet.
2020-02-29 18:29:32 +03:00
Nekotekina
fa0bf6a92c Fix "unknown pragma" on zlib clang workarounds 2020-02-23 10:42:35 +03:00
Nekotekina
92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 2020-02-19 22:54:58 +03:00
Nekotekina
c0f80cfe7a Use attributes for LIKELY/UNLIKELY
Remove LIKELY/UNLIKELY macro.
2020-02-05 10:42:34 +03:00
Nekotekina
1a78e0e80c Make RPCS3 compile in C++2a mode 2020-02-04 23:43:55 +03:00
Nekotekina
0a2874405d logs: allow disabling RPCS3.log.gz
Disabled by creating a directory with the same name.
2020-02-02 14:32:29 +03:00
Nekotekina
87a5dd66ab Move logs::channel registration out of the constructor
Allow constinit initialization of logs::channel.
2020-02-02 14:12:54 +03:00
Nekotekina
ec80932c21 logs: use relaxed atomics
May help with optimizations.
2020-02-01 10:30:03 +03:00
Nekotekina
d5f019c3d3 Implement logs::silence
Disables all log channels.
Also disables unsupported "default" log level for log channels.
2020-01-31 16:44:48 +03:00
Nekotekina
a867522b16 logs: implement logs::get_channels() 2020-01-31 16:44:48 +03:00
Nekotekina
e7b24461ec Implement logs::get_level 2020-01-31 12:09:52 +03:00
Nekotekina
007a7a5859 Fixup for LOG system.
Register all channels at program initialization and allow duplicates.
2020-01-31 12:09:52 +03:00
Silent
9f678cc47a Fix code relying on initialization order
Allows Debug - LLVM to boot
2020-01-31 11:23:55 +03:00
Nekotekina
5b9df53c13 C-style cast cleanup (partial)
Replace C-style casts with C++ casts.
2019-11-29 00:35:23 +03:00
Nekotekina
742bd633d8 Remove fs::file::set_delete
Since it's Windows-only functionality with limited use.
2019-11-08 19:27:11 +03:00
MSuih
f3ed26e9db Small warnings cleanup (#6671)
* Ignore more warnings

These are intentional

* Signed/unsigned mismatch when comparing

* Explictly cast values

* Intentionally discard a nodiscard value

* Change ppu_tid to u32

* Do not use POSIX function name on Windows

* Qt: Use horizontalAdvance instead of width

* Change progress variables to u32
2019-10-25 13:32:21 +03:00
RipleyTom
a32f979814 Conserve error value when trying to open log file 2019-10-24 22:22:15 +03:00
RipleyTom
c89ad38ef1 Check if we're in the process of restarting when trying to open the log 2019-10-24 18:36:28 +02:00
RipleyTom
9f9ac4b696 Auto-updater 2019-10-22 01:51:50 +02:00
scribam
09c9996f31 Use empty() instead of comparing size() with 0
Recommendation from Clang-Tidy: https://clang.llvm.org/extra/clang-tidy/checks/readability-container-size-empty.html
2019-06-01 22:59:23 +03:00
msuih
be6d9af1ab Print OS info to log
Credit to @maximilian578 for help
2019-04-25 20:20:37 +03:00
Megamouse
b929c13c45 implement get_firmware_version
add firmware version to the first line in the log
2019-04-16 22:13:28 +02:00
Nekotekina
0736fc8b28 Add fs::file::set_delete 2019-04-10 13:58:12 +03:00
Nekotekina
bd9131ae1c Implement fs::get_cache_dir
Win32: equal to config dir for now
Linux: respect XDG_CACHE_HOME if specified
OSX: possibly incomplete
2019-01-13 14:45:36 +03:00
Nekotekina
96cabeadff Rewrite condition variables
Implement helper functions balanced_wait_until and balanced_awaken
They include new path for Windows 8.1+ (WaitOnAddress)

shared_mutex, cond_variable, cond_one, cond_x16 modified to use it
Added helper function utils::popcnt16
Replace most semaphore<> with shared_mutex
2018-11-29 01:30:05 +03:00
Nekotekina
26da91c972 Optimize logs
Pass va_args instead of constructing a temporary array
2018-09-19 14:14:04 +03:00
Lassi Hämäläinen
7aef811ff7 CMake: Refactor CMake build (#5032)
* CMake: Refactor build to multiple libraries

- Refactor CMake build system by creating separate libraries for
  different components
- Create interface libraries for most dependencies and add 3rdparty::*
  ALIAS targets for ease of use and use them to try specifying correct
  dependencies for each target
- Prefer 3rdparty:: ALIAS when linking dependencies
- Exclude xxHash subdirectory from ALL build target
- Add USE_SYSTEM_ZLIB option to select between using included ZLib and
  the ZLib in CMake search path

* Add cstring include to Log.cpp

* CMake: Add 3rdparty::glew interface target

* Add Visual Studio CMakeSettings.json to gitignore

* CMake: Move building and finding LLVM to 3rdparty/llvm.cmake script

- LLVM is now built under 3rdparty/ directory in the binary directory

* CMake: Move finding Qt5 to 3rdparty/qt5.cmake script

- Script has to be included in rpcs3/CMakeLists.txt because it defines
  Qt5::moc target which isn't available in that folder if it is
  included in 3rdparty directory
- Set AUTOMOC and AUTOUIC properties for targets requiring them (rpcs3
  and rpcs3_ui) instead of setting CMAKE_AUTOMOC and CMAKE_AUTOUIC so
  those properties are not defined for all targets under rpcs3 dir

* CMake: Remove redundant code from rpcs3/CMakeLists.txt

* CMake: Add BUILD_LLVM_SUBMODULE option instead of hardcoded check

- Add BUILD_LLVM_SUBMODULE option (defaults to ON) to allow controlling
  usage of the LLVM submodule.
- Move option definitions to root CMakeLists

* CMake: Remove separate Emu subtargets

- Based on discussion in pull request #5032, I decided to combine
  subtargets under Emu folder back to a single rpcs3_emu target

* CMake: Remove utilities, loader and crypto targets: merge them to Emu

- Removed separate targets and merged them into rpcs3_emu target as
  recommended in pull request (#5032) conversations. Separating targets
  probably later in a separate pull request

* Fix relative includes in pad_thread.cpp

* Fix Travis-CI cloning all submodules needlessly
2018-09-18 13:07:33 +03:00
Nekotekina
ed8aa774bb Optimize logging via logs::channel
Use constant-initialized severity subobjects instead of temporaries
2018-09-16 00:36:20 +03:00
Nekotekina
ca5158a03e Cleanup semaphore<> (sema.h) and mutex.h (shared_mutex)
Remove semaphore_lock and writer_lock classes, replace with std::lock_guard
Change semaphore<> interface to Lockable (+ exotic try_unlock method)
2018-09-03 23:00:36 +03:00
Jan Beich
cd6bf37d06 Utilities: explicitly add more includes found by GCC
Utilities/Log.cpp: In member function 'void logs::file_writer::log(logs::level, const char*, std::size_t)':
Utilities/Log.cpp:559:9: error: 'memcpy' is not a member of 'std'
    std::memcpy(pos, text, frag);
         ^~~~~~
Utilities/Log.cpp:559:9: note: suggested alternative: 'empty'
    std::memcpy(pos, text, frag);
         ^~~~~~
         empty
Utilities/Log.cpp:560:9: error: 'memcpy' is not a member of 'std'
    std::memcpy(m_fptr, text + frag, size - frag);
         ^~~~~~
Utilities/Log.cpp:560:9: note: suggested alternative: 'empty'
    std::memcpy(m_fptr, text + frag, size - frag);
         ^~~~~~
         empty
Utilities/Log.cpp:564:9: error: 'memcpy' is not a member of 'std'
    std::memcpy(pos, text, size);
         ^~~~~~
Utilities/Log.cpp:564:9: note: suggested alternative: 'empty'
    std::memcpy(pos, text, size);
         ^~~~~~
         empty
Utilities/sync.h: In member function 'int futex(int*, int, int, const timespec*, int*, int)::futex_map::operator()(int*, int, int, const timespec*, int*, uint)':
Utilities/sync.h:110:20: error: 'find' is not a member of 'std'
     map.erase(std::find(map.find(uaddr), map.end(), ref));
                    ^~~~
Utilities/sync.h:110:20: note: suggested alternative: 'rend'
     map.erase(std::find(map.find(uaddr), map.end(), ref));
                    ^~~~
                    rend
2018-08-31 03:19:17 +04:00
Nekotekina
f66d5adf5f Prevent accessing incomplete RPCS3.log.gz
Use permissions to make it inaccessible
On Windows, autodelete the file

Implement fs::unread for this purpose
Rename fs::unshare to fs::lock
Fix fs::lock correctness
2018-03-17 00:39:45 +03:00
Nekotekina
76be7d40ac Remove PSP2 2018-02-09 15:24:46 +03:00
Zion Nimchuk
b9b06143d2 Silence some warnings in some files in Utilities 2017-11-30 18:07:19 +03:00
Nekotekina
33aa2f0b62 Fix log limit 2017-11-27 23:15:28 +03:00
Nekotekina
7d3a528871 Use Qt for error reports 2017-11-23 20:36:21 +03:00
Nekotekina
cc4bc41cf4 Fix free space check (Wnd) 2017-11-23 18:38:05 +03:00
Nekotekina
b60d3a3dae Log: minor improvements 2017-11-23 18:38:05 +03:00
Nekotekina
d32a30bbeb Restore log compression 2017-11-23 18:38:05 +03:00
Nekotekina
868180eacd New logging strategy 2017-11-23 18:38:05 +03:00
Nekotekina
c247ebad0c Log: improve messages for multiple RPCS3 instances 2017-11-23 18:38:05 +03:00
Nekotekina
a6a0f13264 Remove unnecessary include git-version.h 2017-09-20 14:26:42 +03:00
Nekotekina
b83575bcbb Remove unnecessary newline in Log.cpp 2017-09-19 15:07:07 +03:00
Nekotekina
17175e1c23 Fixed global variables in Log.cpp 2017-09-19 15:07:07 +03:00
Nekotekina
cc57719856 Restore UTF-8 in Log.cpp 2017-09-19 15:07:07 +03:00
Nekotekina
be44024a1a Fix initial log message 2017-09-19 15:07:07 +03:00
Nekotekina
c7d4a30646 Backup logs to old_logs/ 2017-09-19 15:07:07 +03:00
Peter Mcteague
c18e71ca29 Add git_branch to git-version.h, add display version info to gs_frame and add branch and version to log. (#3186)
* Added version number and branch name to gs_frame and log file. This also involved making the files that generate git-version.h , get the branch.
2017-09-16 14:54:25 +03:00
Nekotekina
b415b0e737 fs: atomic truncation 2017-09-04 02:15:29 +03:00
Nekotekina
7b96190e6c Log backup rotation (incomplete) 2017-08-30 17:15:35 +03:00
Nekotekina
26e13b4f5f Compress log to RPCS3.log.gz 2017-08-29 17:12:13 +03:00