Commit graph

684 commits

Author SHA1 Message Date
Tomaž Vajngerl
b31eb2ab92 New POST service to render a search result + unit and integ. tests
This adds a new service render-search-result, which renders an
image of the position where, the search fund a hit. The search
result contains the information in which object or paragraph,
which is just the node id and node type from the document model.

The service takes the document and the search result (xml file)
as the input and returns a PNG image as the output.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>

Change-Id: Iffc158c5b0a3c9a63f8d05830314c9bc1616b3b1
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
2021-09-13 10:36:15 +02:00
Dennis Francis
5efa765a7c fix build: add missing break -Werror=implicit-fallthrough
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I12660822829c874179ccffd84dcdd33f5dde27e3
(cherry picked from commit 5a1c42c4e610a9265dfe3527c964413f029060ae)
2021-09-07 10:40:15 +05:30
Dennis Francis
94cadbe033 calc: use document bg color from core to paint canvas bg
Conflicts:
	loleaflet/src/layer/tile/TileLayer.js

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ief814741df4818000cef7499a8b1c9c1ce1f4371
(cherry picked from commit bfed92dffecc3b574f24920733c74565fb1ae29c)
2021-09-07 10:40:15 +05:30
Miklos Vajna
8ba165d5e9 kit: fix build
When building against core.git master:

kit/ChildSession.cpp:2668:13: error: enumeration value 'LOK_CALLBACK_SC_FOLLOW_JUMP' not handled in switch [-Werror,-Wswitch]

It's not clear how we want to handle this in Online, so have a default
label in debug builds as well.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ia0b1cef33e8a5a7fbc1518586ea1e3bb13aa5f22
2021-09-06 09:15:08 +02:00
Tor Lillqvist
6d2a6e110c Remove leftover tiles in the iOS app already when the document is closed
Normally (ideally), tiles (.bmp files) are removed as soon as the JS
has displayed them. But occasionally something goes wrong and they are
left behind. (For instance, it seems to happen if the user closes the
document immediately when it shows up.)

Do not leave them on disk until the app starts the next time.

Change-Id: I0c764280a69a16ad3b7b67c329832fd5331c2e1e
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-09-01 13:32:23 +03:00
Tor Lillqvist
65b8001d73 Remove more leftover files taking space in the iOS app
Remove the app's copy of the document after core has saved it and we
have stored the edited version at its real location.

Remove possible leftover tile bitmaps when the app starts.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ibc41be38c2cfb689c532640d148116bc06a248ab
2021-08-24 18:02:40 +03:00
Miklos Vajna
4cfbd6b65c kit: improve StringVector usage in ChildSession::getClipboard()
It returns a temporary.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I5a9df90a4e7dda05cc387e5dc11842ea8e237504
2021-08-04 17:02:16 +01:00
Tor Lillqvist
4f926a450e Print a header in front of the list of last UNO commands
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I1f7194edb833d8569ca7bd87cadd903deb84ef0e
2021-07-26 09:36:58 +03:00
Gökay ŞATIR
01505278a6 KitHelper: Get page rectangles with status message.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I6a6140d46c16c5ebd9ae1c80a441a7129ad1ada5
2021-07-25 11:58:34 +03:00
Gopi Krishna Menon
b3d5a2563c Add profilezone around kitPoll function and SocketPoll constructor
Add profile zone around kitPoll function and SocketPoll constructor to
improve trace event generation

Signed-off-by: Gopi Krishna Menon <krishnagopi487.github@outlook.com>
Change-Id: Ia46e9add59a57935997649fe39861a8d851e1ff0
2021-07-21 15:00:31 +03:00
Tor Lillqvist
d9fc146605 Bypass updateFreemiumStatus unless ENABLE_FREEMIUM
Fixes build of iOS app.

Change-Id: Icf4e49c7d4d8f77a37557e1990f37673e1b9c91d
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-07-20 14:41:18 +05:30
Pranam Lashkari
e02e1df76d Introduce Freemium options
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ib6b68ff74839cf84f2d8c8cfb7d380be9209f923
2021-07-20 14:41:18 +05:30
Ashod Nakashian
9c50fdc155 wsd: better logging of the document activity
Change-Id: I89e673ffa819600bd227fab291a46d9108ed5cca
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-07-17 22:58:23 -04:00
Szymon Kłos
d7c985e9b5 jsdialog: handle exception on bad id
issue wrt busypopup sending string id for dialogEvent
was already fixed on JS side.

remove unnecessary comment from commit 48f7449
Ignore conversion error from std::stoull for "busypopup"

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7640b4f693d9d018ae17acb3a9eb292a2423bb68
2021-07-17 16:35:27 +02:00
Henry Castro
f43c4b32e5 kit: add payload to 'statusindicatorstart'
Change-Id: I3145c6c622204e4c4898c8490176baff39b07636
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-07-15 15:21:24 +02:00
Michael Meeks
823c30b39b Ensure that we get the file-name right before sending the save result.
We cannot rely on wsd being slower than the kit. The rename
has to happen before wsd / DocumentBroker gets to trying to access
the filename. fixes #2874.

Change-Id: Ie1e67cd059fb6a663048967c47759238c067172d
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-07-15 09:08:06 +01:00
Gopi Krishna Menon
9d86193972 Log Last Uno 4 Commands During a Fatal Crash
Records the uno commands from different instances of ChildSession and
dumps the last 4 uno commands into the crashlog during a fatal crash

Signed-off-by: Gopi Krishna Menon <krishnagopi487.github@outlook.com>
Change-Id: I838f71769dc08df7076c040f3d72c15f7607e9d3
2021-07-13 19:48:21 +03:00
Tor Lillqvist
bd0c225c9f Revert "Make it possible to generate Trace Events already when loading the document"
Makes unit-rendering-options fail reliably.

This reverts commit 175c9c5b2a.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Id05c911991baaae0dbc52678a192fc01639352e0
2021-07-07 12:38:11 +03:00
Tor Lillqvist
175c9c5b2a Make it possible to generate Trace Events already when loading the document
By passing a traceevent=yes query parameter in the URL. Note that if
Trace Event generation is not enabled in loolwsd.xml this will have no
effect.

It is a bit silly to notice this query parameter only in loleaflet and
then send the information back to the server. Would be better if the
server noticed it itself before sending the URL to loleaflet.

While at it, let's not bother ever enabling Trace Event generation in
the WSD process. That is not what we are interested in.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I985bfd1e2dbd14aa5a55b386b4762fb64bcb4008
2021-07-07 09:28:02 +03:00
Tor Lillqvist
48f7449d24 Ignore conversion error from std::stoull for "busypopup"
Avoids logging an ERR message about it.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: If9e9627b3a10362e415edf2bfa6abf1f37c0b650
2021-07-05 22:35:55 +03:00
Gopi Krishna Menon
de403fc12e Improve logging Information
Improve logging information in setdocumentPassword for better clarity :)

Signed-off-by: Gopi Krishna Menon <gopi.menon@collabora.com>
Change-Id: I292991cbee2cf0cf1430ba4c5626b6e08ccbc0f5
2021-07-02 17:17:02 +03:00
Mike Kaganski
4751ff3e2b Initialize the vectors instead of reserving
The vectors are accessing the elements without pushing to the back.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ia01b54f80b70173b994e776e05710e92248f0e23
2021-07-01 18:18:00 +00:00
Mike Kaganski
1d7e8539bb Hardcode some trigonometry, and move some FP math out from loop
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I753d1f44e176d4033ead57c6ffdb0f8c8369cfc2
2021-07-01 18:17:25 +00:00
Michael Meeks
e289597315 Add a processtoidle event implementation.
This can be used to accelerate unit tests by allowing us to ensure
that all pending work is done between a 'processtoidle' message being
sent and an 'idle' being returned. This can be much faster than waiting
a defined length of time.

Change-Id: I6d96de205d1fd34a22e0ddbd2709bf806a97b33c
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-06-29 17:12:01 +01:00
Tor Lillqvist
7d7b511b83 Guard against the config system being uninitialized
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ifcd2852433bb329c938755300b84a74dd22a8a07
2021-06-21 12:43:17 +03:00
Tor Lillqvist
4c68a97ce5 Re-factor Trace Event stuff for improved functionality and thread safety
Write to the Trace Event JSON file in just one place, protected by a
mutex.

Handle metadata events separately. We want them to propagate to the
output if Event Trace generation is just enabled, regardless whether
it has been turned on or not.

We can send the metadata for the Kit process only after we have opened
the docuemnt as sending a Trace Event to WSD uses the (singleton)
Document object in Kit.

Introduce some new functions for the above and adapt callers
appropriately.

Generate a Complete event for the handling of one image tile, from
setting the src attribute of the Image object to finishing the onload
function.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I5978e0fb2495e0d2dc479bf861eb4ac7da03fa50
2021-06-21 12:43:17 +03:00
Tor Lillqvist
12c48004b9 Add a newline after the Trace Event object string here
Just for clarity, so that each object ends up on a line of its own in
the Trace Event output JSON file.

The stringified object already should contain the comma separator at
the end. Probably should change that, make it so that the comma
separators are added when emitting to the file (or sending to WSD.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ibef117afbe9f099c26b42ce32d280055df86d984
2021-06-21 12:43:17 +03:00
Tor Lillqvist
8513a25d06 Emit a Trace Event metadata event for the name of a Kit process
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I5fd41d27b63fc9b16a4b06d014dbeedb673121c3
2021-06-21 12:43:17 +03:00
Tor Lillqvist
d6569159b7 Output a Trace Event metadata event identifying each named thread
Move the generic dummy implementation of
TraceEvent::emitOneRecording() to a source file of its own. (That is
the one which is used in test and tool executables.)

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I81cab07e5a6852b42d278a5446c13c3825cf546e
2021-06-21 12:43:17 +03:00
Ashod Nakashian
d4e60da934 wsd: support uploading after loading from a template
Templates are special because the file that gets
loaded is not in the same format as the final one.
An implicit save-as is issued in Kit for template
loads right after loading to create the final
document format. It is this file (as opposed to the
template) that needs to be uploaded, which we do
right after we get the 'status:' message in
DocBroker to actually create the first version
in storage.

Change-Id: I23cbf527f1059b0b4059f15069737ab35ac860e7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-06-19 17:44:59 -04:00
Ashod Nakashian
f2f713cdaf wsd: rename file after saving to support async uploading
To avoid writing (saving) while reading (uploading) or
any other undesirable racse on the document file,
we atomically rename the file after saving on disk
to pass ownership.

After saving in Core, we rename the document in the
jail to .upload (by appending it). DocumentBroker
looks for the file with that extension and atomically
renames it to .uploading (by appening the 'ing' suffix).
This way, the Kit only renames from the original to
.upload and DocBroker renames only .upload to .uploading.
This guarantees that we never rename the same file
concurrently.

Uploading decision is strictly based on the modified
timestamp of the .uploading file, compared to the
timestamp of the last file we uploaded successfully.

Change-Id: I03520cd8c87605f6dad417e7a978204f76fc0c38
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-06-19 17:44:59 -04:00
Mike Kaganski
cb917d7eae Bail out of getPixmap gracefully, when rendering failed.
And only insert the new pixmap after the check.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I310d321443152967b3aed8992ece3b55287d01cc
2021-06-16 17:42:26 +02:00
Tor Lillqvist
34f345f1ee Emit a Trace Event (when enabled and turned on) in ChildSession::_handleInput
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I8fab2f6f8e86d01fafba0f7bb799c503b5331018
2021-06-16 07:17:44 +03:00
Michael Meeks
7227c7c48a Remove dupliate forward definition.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-06-15 15:44:21 +01:00
Michael Meeks
f8a5edb995 Transfer LOK callback processing into our main thread if necessary.
While we are processing data in the poll handler, we can have
another helpful thread from the core sending things to us:

loolforkit(Socket::assertCorrectThread(char const*, int))
loolforkit(WebSocketHandler::sendFrame(std::shared_ptr<StreamSocket> const&, char const*, unsigned long, unsigned char, bool) const)
loolforkit(WebSocketHandler::sendMessage(char const*, unsigned long, WSOpCode, bool) const)
loolforkit(Document::postMessage(char const*, int, WSOpCode) const)
loolforkit(Document::sendFrame(char const*, int, WSOpCode))
loolforkit(ChildSession::sendTextFrame(char const*, int))
loolforkit(ChildSession::loKitCallback(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))
loolforkit(Document::GlobalCallback(int, char const*, void*))
/core/instdir/program/libsofficeapp.so()
/core/instdir/program/../program/libfwklo.so()
/core/instdir/program/libscfiltlo.so()
/core/instdir/program/libexpwraplo.so()
/core/instdir/program/libooxlo.so(oox::core::FastParser::parseStream(com::sun::xml::sax::InputSource const&, bool))
/core/instdir/program/libooxlo.so(oox::core::FastParser::parseStream(com::sun::uno::Reference<com::sun::io::XInputStream> const&, rtl::OUString const&))
/core/instdir/program/libooxlo.so(oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&))
/core/instdir/program/libscfiltlo.so()
/core/instdir/program/libcomphelper.so(comphelper::ThreadTask::exec())
/core/instdir/program/libcomphelper.so()
/core/instdir/program/libuno_salhelpergcc3.so.3(salhelper::Thread::run())
/core/instdir/program/libuno_salhelpergcc3.so.3()
/core/instdir/program/libuno_sal.so.3()
/lib/x86_64-linux-gnu/libpthread.so.0()
/lib/x86_64-linux-gnu/libc.so.6(clone)

This is most likely from eg. threaded parsing of various file formats,
or progress messages while loading / saving, sent while the SolarMutex
is locked.

We assume that:
  + there will only ever be one thread running inside kitPoll
    this is enforced by vcl/headless.
  + and so, we can safely mutate SocketPoll and Socket buffer
    state from this thread.
  + there are only two entry points for callbacks from threads
    in core - which are both instrumented, and if necessary
    their work is shifted to this thread.

Memory corruptions matching the above trace, suggesting that
multiple writes have collided between kitPoll and an event
callback have been seen in the wild.

Change-Id: I5b084cbfec1ea326b6e17c9e5590a8c8e35b3854
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-06-14 09:31:26 +01:00
Dennis Francis
98c78caa4d fix: watermark not present in fully transparent tiles
Calc has transparent tiles due to client side grid/bg rendering, so do
alpha blending in calc for transparent pixels. As before do alpha
blending for the font rendering phase, no change there.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I30ab21475b6654a9375574be825e01edbdabf82a
(cherry picked from commit 7b7a73c17d4f6213e78f0b8737ce70cbaccbb56d)
2021-06-14 13:33:13 +05:30
Michael Meeks
655493a7bc Transfer LOK callback processing into our main thread if necessary.
While we are processing data in the poll handler, we can have
another helpful thread from the core sending things to us:

loolforkit(Socket::assertCorrectThread(char const*, int))
loolforkit(WebSocketHandler::sendFrame(std::shared_ptr<StreamSocket> const&, char const*, unsigned long, unsigned char, bool) const)
loolforkit(WebSocketHandler::sendMessage(char const*, unsigned long, WSOpCode, bool) const)
loolforkit(Document::postMessage(char const*, int, WSOpCode) const)
loolforkit(Document::sendFrame(char const*, int, WSOpCode))
loolforkit(ChildSession::sendTextFrame(char const*, int))
loolforkit(ChildSession::loKitCallback(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))
loolforkit(Document::GlobalCallback(int, char const*, void*))
/core/instdir/program/libsofficeapp.so()
/core/instdir/program/../program/libfwklo.so()
/core/instdir/program/libscfiltlo.so()
/core/instdir/program/libexpwraplo.so()
/core/instdir/program/libooxlo.so(oox::core::FastParser::parseStream(com::sun::xml::sax::InputSource const&, bool))
/core/instdir/program/libooxlo.so(oox::core::FastParser::parseStream(com::sun::uno::Reference<com::sun::io::XInputStream> const&, rtl::OUString const&))
/core/instdir/program/libooxlo.so(oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&))
/core/instdir/program/libscfiltlo.so()
/core/instdir/program/libcomphelper.so(comphelper::ThreadTask::exec())
/core/instdir/program/libcomphelper.so()
/core/instdir/program/libuno_salhelpergcc3.so.3(salhelper::Thread::run())
/core/instdir/program/libuno_salhelpergcc3.so.3()
/core/instdir/program/libuno_sal.so.3()
/lib/x86_64-linux-gnu/libpthread.so.0()
/lib/x86_64-linux-gnu/libc.so.6(clone)

This is most likely from eg. threaded parsing of various file formats,
or progress messages while loading / saving, sent while the SolarMutex
is locked.

We assume that:
  + there will only ever be one thread running inside kitPoll
    this is enforced by vcl/headless.
  + and so, we can safely mutate SocketPoll and Socket buffer
    state from this thread.
  + there are only two entry points for callbacks from threads
    in core - which are both instrumented, and if necessary
    their work is shifted to this thread.

Memory corruptions matching the above trace, suggesting that
multiple writes have collided between kitPoll and an event
callback have been seen in the wild.

Change-Id: I5b084cbfec1ea326b6e17c9e5590a8c8e35b3854
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-06-11 14:19:55 +01:00
Tor Lillqvist
1c316bb7b8 Fix crash in iOS app
No separate Kit process in the mobile apps, and the iOS app even can
have several documents open simultaneously, so the singletonDocument
variable does not make sense.

If we at some stage want to generate Trace Event log files also in the
iOS or Android app (perhaps not likely), will have to handle it in a
different fashion. All the code runs in one process anyway in the
mobile apps, so it wouldn't make sense to "send" collected Trace
Events to the code standing in for the WSD process.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I5777b48e98121c3ed55e590d5009e2658af2ef22
2021-06-11 14:07:57 +03:00
Tor Lillqvist
8cef48a0fa Introduce a generic TraceEvent class and instant events here, too
Modelled on how it is done in core. ProfileZone is derived from
NamedEvent which is derived from TraceEvent. Here we don't keep any
separate ProfileZone.hpp, though.

This was needed to introduce generation of "instant" events here, too.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I6583134e96001641c50339deb4197fca6ab7d5d5
2021-06-02 09:04:21 +03:00
Henry Castro
6c2203e747 kit: revisit log messages ChildSession.cpp
LOG_FTL = abnormal, crash, denied service
LOG_ERR = load, save, session, connection, wrong parameters
other cases LOG_WRN, LOG_INF

Change-Id: I76b4b066db59acd2e7dc45bf8606021104f79cae
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-06-01 14:14:22 -04:00
Tor Lillqvist
7785eb0481 Keep the return value from config::getBool() in static const bools
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I823cbd4ace71f9fd5a45e6c042599cdea03458c8
2021-05-31 10:56:19 +03:00
Tor Lillqvist
2ac4350e22 Don't send individual ProfileZone recordings to the WSD process, but buffer them
Change-Id: Ie3ec57ff38035d786ae081266ed81793bcf60514
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-31 10:56:19 +03:00
Tor Lillqvist
3553430a62 Try to fix iOS and Android build
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I0839c589517f64d966fec9f247dda4163bdbe5fd
2021-05-31 10:56:19 +03:00
Tor Lillqvist
929e466c91 Re-work the ProfileZone implementation here
Don't bother collecting them into a vector, like in core. Instead,
just call a static member function ProfileZone::addOneRecording() for
each Event Trace object (string) to be emitted. That function then
needs to be implemented separately in each executable. In WSD it logs
the object to the Event Trace file. In Kit it sends it to WSD for
logging. In Unit tests we use a dummy implementation.

(If Event Trace logging is not enabled at all in loolwsd.xml (the
default), nothing is done, of course.)

When receiving the "traceeventrecording start" or "traceeventrecording
stop" message from the client, turn ProfileZone recoring on or off in
the WSD and Kit process. (Probably in WSD the flag should be
per-client.)

Change-Id: Ie1127d65dd44ed77e7eeab4b0f0a90cce95dc4a2
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-31 10:56:19 +03:00
Tor Lillqvist
9d45ab005c Add TODO
Change-Id: Id75eaacbdb826892bd7dbc4329852a3716e1719a
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-19 13:33:26 +03:00
Tor Lillqvist
9c6b74ad08 Use a loolwsd.xml setting instead of --enable-trace-event-logging
That is our convention, and this also avoids a global variable in the
kit process.

Change-Id: I37d2d53aa7eb24f9848fa8ef98bc57d75db90d13
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-19 13:33:26 +03:00
Gökhan Karabulut
dbbf03d63b Remove unused field
Field `_lastMemStatsTime` is not used, so remove it.

Signed-off-by: Gökhan Karabulut <gokhanettin@gmail.com>
Change-Id: I4739e5f64d44b04b5c2c9c5c4081b05f2bb4e0ee
2021-05-13 09:29:35 +01:00
Gökhan Karabulut
7f736a9bc4 Improve state dump
Add `dumpState` methods to `TileQueue`, `PngCache`, `ThreadPool` classes
and call them from Document::dumpState method within kit.Kit.cpp.
Because `dumpState` method of `_websocketHandler` is protected,
currently we can't dump its internals.

Also dump the other members of the `Document` class. Note that as
`_lastMemStatsTime` is never used, we don't dump it. It seems we could
simply delete it.

Signed-off-by: Gökhan Karabulut <gokhanettin@gmail.com>
Change-Id: Ia89b7fff41eaf475c7a09a644c0eb523b72cf97d
2021-05-13 09:29:35 +01:00
Tor Lillqvist
9da0145280 Add an --enable-trace-event-logging option to loolwsd
It enables turning Trace Event recording on (and off again). The
option is passed down to the client through loleaflet.html, and to the
KIT processes. If the option is not used, the new JS functions that
send trace events to the server turn into no-ops to avoid wasting
bandwidth.

It is always on in a "make run".

Change-Id: Iafe1919ccba7c376137d3e0568b857e20780bbc8
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-10 12:39:07 +03:00
Michael Meeks
204607ea43 Don't enable profiling yet.
Kit initialization uses 'trace' for very early start, and then
switches to the configured trace level later on, so don't use
it this early.

Change-Id: I8e0333930b46e5ad25658d7eda12d7469bdfdd1e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-05-06 20:31:55 +03:00