Skip to content

Commit

Permalink
6950 ARC should cache compressed data
Browse files Browse the repository at this point in the history
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Don Brady <don.brady@intel.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
  • Loading branch information
grwilson authored and ahrens committed Jul 14, 2016
1 parent a5dce49 commit dcbf3bd
Show file tree
Hide file tree
Showing 58 changed files with 4,422 additions and 1,990 deletions.
20 changes: 19 additions & 1 deletion usr/src/cmd/mdb/common/mdb/mdb_ctf.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Use is subject to license terms.
*/
/*
* Copyright (c) 2013 by Delphix. All rights reserved.
* Copyright (c) 2013, 2015 by Delphix. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
*/

Expand Down Expand Up @@ -910,6 +910,24 @@ mdb_ctf_offsetof_by_name(const char *type, const char *member)
return (off);
}

ssize_t
mdb_ctf_sizeof_by_name(const char *type)
{
mdb_ctf_id_t id;
ssize_t size;

if (mdb_ctf_lookup_by_name(type, &id) == -1) {
mdb_warn("couldn't find type %s", type);
return (-1);
}

if ((size = mdb_ctf_type_size(id)) == -1) {
mdb_warn("couldn't determine type size of %s", type);
return (-1);
}

return (size);
}

/*ARGSUSED*/
static int
Expand Down
3 changes: 2 additions & 1 deletion usr/src/cmd/mdb/common/mdb/mdb_ctf.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Use is subject to license terms.
*/
/*
* Copyright (c) 2013 by Delphix. All rights reserved.
* Copyright (c) 2013, 2015 by Delphix. All rights reserved.
* Copyright (c) 2015, Joyent, Inc.
*/

Expand Down Expand Up @@ -136,6 +136,7 @@ extern int mdb_ctf_member_info(mdb_ctf_id_t, const char *,
extern int mdb_ctf_offsetof(mdb_ctf_id_t, const char *, ulong_t *);
extern int mdb_ctf_num_members(mdb_ctf_id_t);
extern int mdb_ctf_offsetof_by_name(const char *, const char *);
extern ssize_t mdb_ctf_sizeof_by_name(const char *);

extern ssize_t mdb_ctf_offset_to_name(mdb_ctf_id_t, ulong_t, char *, size_t,
int, mdb_ctf_id_t *, ulong_t *);
Expand Down
3 changes: 2 additions & 1 deletion usr/src/cmd/mdb/common/modules/conf/mapfile-extern
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013 by Delphix. All rights reserved.
# Copyright (c) 2013, 2015 by Delphix. All rights reserved.
#
# CDDL HEADER START
#
Expand Down Expand Up @@ -67,6 +67,7 @@ SYMBOL_SCOPE {
mdb_ctf_module_lookup { FLAGS = EXTERN };
mdb_ctf_offsetof { FLAGS = EXTERN };
mdb_ctf_offsetof_by_name { FLAGS = EXTERN };
mdb_ctf_sizeof_by_name { FLAGS = EXTERN };
mdb_ctf_readsym { FLAGS = EXTERN };
mdb_ctf_type_cmp { FLAGS = EXTERN };
mdb_ctf_type_invalidate { FLAGS = EXTERN };
Expand Down
Loading

0 comments on commit dcbf3bd

Please sign in to comment.