hotspot/src/share/vm/gc/shared/allocTracer.cpp
changeset 46329 53ccc37bda19
parent 40664 1ec65b303bb7
equal deleted inserted replaced
46328:6061df52d610 46329:53ccc37bda19
     1 /*
     1 /*
     2  * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    26 #include "gc/shared/allocTracer.hpp"
    26 #include "gc/shared/allocTracer.hpp"
    27 #include "runtime/handles.hpp"
    27 #include "runtime/handles.hpp"
    28 #include "trace/tracing.hpp"
    28 #include "trace/tracing.hpp"
    29 #include "utilities/globalDefinitions.hpp"
    29 #include "utilities/globalDefinitions.hpp"
    30 
    30 
    31 void AllocTracer::send_allocation_outside_tlab_event(KlassHandle klass, size_t alloc_size) {
    31 void AllocTracer::send_allocation_outside_tlab_event(Klass* klass, size_t alloc_size) {
    32   EventObjectAllocationOutsideTLAB event;
    32   EventObjectAllocationOutsideTLAB event;
    33   if (event.should_commit()) {
    33   if (event.should_commit()) {
    34     event.set_objectClass(klass());
    34     event.set_objectClass(klass);
    35     event.set_allocationSize(alloc_size);
    35     event.set_allocationSize(alloc_size);
    36     event.commit();
    36     event.commit();
    37   }
    37   }
    38 }
    38 }
    39 
    39 
    40 void AllocTracer::send_allocation_in_new_tlab_event(KlassHandle klass, size_t tlab_size, size_t alloc_size) {
    40 void AllocTracer::send_allocation_in_new_tlab_event(Klass* klass, size_t tlab_size, size_t alloc_size) {
    41   EventObjectAllocationInNewTLAB event;
    41   EventObjectAllocationInNewTLAB event;
    42   if (event.should_commit()) {
    42   if (event.should_commit()) {
    43     event.set_objectClass(klass());
    43     event.set_objectClass(klass);
    44     event.set_allocationSize(alloc_size);
    44     event.set_allocationSize(alloc_size);
    45     event.set_tlabSize(tlab_size);
    45     event.set_tlabSize(tlab_size);
    46     event.commit();
    46     event.commit();
    47   }
    47   }
    48 }
    48 }