Richard Hughes
cf9ebdb703
Add startup profiling functionality
...
Using `sudo FWUPD_PROFILE=10 ./src/fwupd --verbose` will print a
dump of startup times onto the console so that we can debug which
plugin is slowing down system startup. For example:
../src/fu-engine.c:5409:plugins-coldplug [108.55ms]:
../plugins/amt/fu-plugin-amt.c:437:amt [27.14ms]:
:create-context [12.66ms]
:get-version [8.44ms]
:add-device [3.95ms]
2022-06-14 22:08:02 +01:00
Richard Hughes
7a5964435f
Add startup profiling support to FuPlugin->init()
2022-06-14 22:08:02 +01:00
Richard Hughes
faa7871b08
Remove duplicate ->probe() calls to speed up startup by 150ms
...
Now incorporate is fixed to copy across the properties we need in the
superclass, we don't need to do the subclass ->probe().
Note, we still need to do the subclassed ->probe() when using
FU_UDEV_DEVICE_FLAG_VENDOR_FROM_PARENT or when looking at properties
on the parent device.
This also removes the spurious 'already set GType to FuVliUsbhubDevice,
ignoring FuVliUsbhubDevice' messages when running the daemon.
2022-06-14 21:01:57 +01:00
Richard Hughes
21e3ef4347
optionrom: Reorder plugins FuDevice->probe() to speed up daemon startup
...
There's no point scanning the baseclass again if we can quickly check
if the device is valid.
2022-06-14 21:01:57 +01:00
Richard Hughes
4655e028a6
Copy more properties when doing FuUdevDevice->incorporate
...
We're supposed to be copying any private data derived during ->probe()
so we can create a superclass with the same attributes.
2022-06-14 21:01:57 +01:00
Richard Hughes
db01004cd4
Copy the possible plugins when incorporating
...
I don't think this is required, but seems safer.
2022-06-14 21:01:57 +01:00
Richard Hughes
30aab6f564
Copy the instance ID strings when incorporating
...
Also, add a test.
2022-06-14 21:01:57 +01:00
Richard Hughes
599e67cd2c
trivial: More efficiently incorporate metadata
2022-06-14 21:01:57 +01:00
Richard Hughes
8b3f7a1a52
trivial: Add some self tests for fwupd_device_incorporate()
...
This was based on a hunch that was proved wrong, but the tests still
seem useful anyway.
2022-06-14 21:01:57 +01:00
Richard Hughes
2203b3ce7b
trivial: gi-docgenize some of the function comments
2022-06-14 14:36:52 -05:00
Richard Hughes
2dc6a7ef73
Remove fu_i2c_device_read_full()
...
Just use the version with the length specified.
2022-06-14 14:36:52 -05:00
Richard Hughes
bb577bdf04
f-fu_smbios_to_string
2022-06-14 14:36:52 -05:00
Richard Hughes
d4d0ba0faf
Unexport fu_common_cab_build_silo()
...
There's no reason this needs to be in the shared library.
2022-06-14 14:36:52 -05:00
Richard Hughes
3eaa907534
Remove the now unnecessary fu_smbios_to_string()
2022-06-14 14:36:52 -05:00
Richard Hughes
fc2da47b69
Remove fu_strtoull_full()
2022-06-14 14:36:52 -05:00
Richard Hughes
377bcb718f
Remove the 'common' prefix from the volume creation methods
2022-06-14 14:36:52 -05:00
Richard Hughes
4105768a01
Remove the 'common' prefix when parsing version numbers
2022-06-14 14:36:52 -05:00
Richard Hughes
1d9d82ebc5
Use a common prefix for CPU-specific methods
2022-06-14 14:36:52 -05:00
Richard Hughes
3e0a4dc1c3
Be smarter and include less header files per source file
2022-06-14 14:36:52 -05:00
Richard Hughes
067d7d8088
Split out the path helpers to a new source file
2022-06-14 14:36:52 -05:00
Richard Hughes
2822d724b2
Unexport the nearly-unused FuAppFlags
2022-06-14 14:36:52 -05:00
Richard Hughes
770a452132
Unexport fu_common_error_array_get_best()
...
Plugins should not be using this.
2022-06-14 14:36:52 -05:00
Richard Hughes
14cc9b2064
Unexport fu_common_reverse_uint8()
...
It's only used in one little-used plugin.
2022-06-14 14:36:52 -05:00
Richard Hughes
7f86ffab6f
Split out the dump helpers to a new source file
2022-06-14 14:36:52 -05:00
Richard Hughes
72ca59653e
Unexport fu_common_uri_get_scheme()
...
We don't want plugins to be using this.
2022-06-14 14:36:52 -05:00
Richard Hughes
518ba8b6f7
Unexport fu_common_realpath()
...
We don't want plugins to be using this.
2022-06-14 14:36:52 -05:00
Richard Hughes
2c5e4ff3ab
Unexport fu_common_firmware_builder()
...
We don't want plugins to be using this.
2022-06-14 14:36:52 -05:00
Richard Hughes
3f77af3cd4
Split out the kernel helpers to a new source file
2022-06-14 14:36:52 -05:00
Richard Hughes
fd9b9db5b3
Unexport fu_common_instance_id_strsafe()
...
We want plugins to use the instance ID builder instead now.
2022-06-14 14:36:52 -05:00
Richard Hughes
f759569a9f
Unexport fu_common_extract_archive()
...
We have a FuFirmware helper now, which doesn't use a temp dir.
2022-06-14 14:36:52 -05:00
Richard Hughes
25dccf09f7
Unexport fu_common_spawn_sync()
...
This isn't something we want plugins to use.
2022-06-14 14:36:52 -05:00
Richard Hughes
425fedcca1
trivial: Remove fu_byte_array_set_size_full()
2022-06-14 14:36:52 -05:00
Richard Hughes
ed1b13da28
Split out the memory helpers to a new source file
2022-06-14 14:36:52 -05:00
Richard Hughes
4b1313b406
Split out the GByte helpers to a new source file
2022-06-14 14:36:52 -05:00
Richard Hughes
9d33c29e92
Split out the string helpers to a new source file
2022-06-14 14:36:52 -05:00
Richard Hughes
c6581fb7a6
Split out the GByteArray helpers to a new source file
2022-06-14 14:36:52 -05:00
Richard Hughes
3fe9c0de34
Split out the CRC and sum functions to new source files
2022-06-14 14:36:52 -05:00
Richard Hughes
0d1ba6667f
trivial: Remove a few ctags headers that snuck in
2022-06-14 17:57:38 +01:00
Richard Hughes
9b29d70f31
Add a progress flag to indicate for when the child returns early
...
Using `fu_progress_finished(fu_progress_get_child(progress))` is IMHO
a hacky workaround.
2022-06-14 14:31:19 +01:00
Richard Hughes
e60a877c46
uefi-capsule: Do not generate a capsule header for the FMP GUID
...
In theory, hardware with FMP should have fw_type=0x4 in the ESRT which
sets `_NO_CAPSULE_HEADER_FIXUP` -- but in reality that is not always
the case.
2022-06-14 14:11:26 +01:00
Sean Rhodes
6a1ceebd4c
plugins/intel-spi: Correct BIOS Control Device ( #4742 )
...
Correct the BIOS Control Device, which is should be 31.
This can be found on Intel doc numbers:
* 334819 (APL)
* 336561 (GLK)
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2022-06-14 09:07:48 +00:00
Richard Hughes
28395271e9
trivial: Fix a tiny memory leak with fwupdtool get-plugins
2022-06-13 20:17:45 +01:00
Richard Hughes
2ae4587a1c
trivial: Add three more update categories
2022-06-13 13:00:38 +01:00
Mario Limonciello
47756bbdf3
trivial: fix publishing of docker containers
2022-06-13 06:56:35 -05:00
Mario Limonciello
ae59855233
trivial: Revert "Revert "build(deps): bump docker/build-push-action from 1 to 3""
...
This reverts commit 7ac253dbb8
.
It seems this didn't fix container generation.
2022-06-13 00:39:54 -05:00
Mario Limonciello
996fc8d242
trivial: Revert "Revert "build(deps): bump actions/upload-artifact from 2 to 3""
...
This reverts commit 793aa9a365
.
2022-06-13 00:39:38 -05:00
Gaël PORTAY
88db2a3f9e
genesys: scaler: Fix calling to parent's vfunc close()
...
This uses the internal flag FU_DEVICE_INTERNAL_FLAG_USE_PARENT_FOR_OPEN,
to fix the calling to the parent's vfunc close() (it was calling the
parent's vfunc open() on close()).
2022-06-12 08:22:57 -04:00
Gaël PORTAY
d5b7206a3a
trivial: genesys: Another nitpick round
...
See commit e6f049625e
.
2022-06-12 08:22:57 -04:00
Gaël PORTAY
58102313bc
genesys: usbhub: Do not claim interface
...
This removes the claim for interface 0; and removes both vfunc open()
and close() that become useless.
Fixes https://github.com/fwupd/fwupd/issues/4730
2022-06-12 07:02:49 -04:00
Gaël PORTAY
2e719aeb94
genesys: usbhub: Remove vfunc _probe()
...
This removes the vfunc _probe() that is not used anymore.
2022-06-12 07:02:49 -04:00