RFR: 8246260: JFR: Write event size field without padding

Erik Gahlin erik.gahlin at oracle.com
Wed Jun 3 10:40:09 UTC 2020


Ah, I missed that. Will fix.

Thanks
Erik


> On 3 Jun 2020, at 12:17, Jaroslav Bachorík <jaroslav.bachorik at datadoghq.com> wrote:
> 
> I still can see it in the jfrEventWriterHost.hpp
> ```
>  42 template <typename BE, typename IE, typename WriterPolicyImpl >
>  43 class StackEventWriterHost : public EventWriterHost<BE, IE,
> WriterPolicyImpl> {
>  44  public:
>  45   template <typename StorageType>
>  46   StackEventWriterHost(StorageType* storage, Thread* thread);
>  47   StackEventWriterHost(Thread* thread);
>  48   ~StackEventWriterHost();
>  49
>  50 };
> ```
> 
> Am I missing something?
> 
> Cheers,
> 
> -JB-
> 
> On Wed, Jun 3, 2020 at 11:58 AM Erik Gahlin <erik.gahlin at oracle.com> wrote:
>> 
>> Thanks Jaroslav.
>> 
>> It has  been removed. See
>> http://cr.openjdk.java.net/~egahlin/8246260/src/hotspot/share/jfr/writers/jfrEventWriterHost.inline.hpp.sdiff.html
>> 
>> Cheers
>> Erik
>> 
>>> On 3 Jun 2020, at 11:32, Jaroslav Bachorík <jaroslav.bachorik at datadoghq.com> wrote:
>>> 
>>> Hi Erik,
>>> 
>>> nice optimization!
>>> 
>>> The changes look good.
>>> 
>>> In http://cr.openjdk.java.net/~egahlin/8246260/src/hotspot/share/jfr/writers/jfrEventWriterHost.hpp.sdiff.html
>>> the StackEventWriterHost class does not seem to be used anywhere
>>> anymore. Could it also be removed?
>>> 
>>> Cheers,
>>> 
>>> -JB-
>>> 
>>> On Mon, Jun 1, 2020 at 9:34 PM Erik Gahlin <erik.gahlin at oracle.com> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> Could I have a review of a fix that reduces the size of a recording with 10-15% by writing the event size field in compressed integer form instead of the padded format (4 bytes).
>>>> 
>>>> The implementation gambles on that an event takes up less than 128 bytes and writes the size as a single byte. If it is not true, it rewrites the event from start and tags the event type as large, so the next time an event of the same type is to be written, the penalty will not need to be paid.
>>>> 
>>>> The change is compatible with the current file format.
>>>> 
>>>> Bug:
>>>> https://bugs.openjdk.java.net/browse/JDK-8246260
>>>> 
>>>> Webrev:
>>>> http://cr.openjdk.java.net/~egahlin/8246260/
>>>> 
>>>> Testing: tier1 + tier2 + jdk/jfr/jfr + JMC
>>>> 
>>>> Thanks
>>>> Erik
>> 



More information about the hotspot-jfr-dev mailing list