linux-newbie.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: Rajat Jain <rajatjain@juniper.net>
Cc: "kernelnewbies@kernelnewbies.org"
	<kernelnewbies@kernelnewbies.org>,
	"linux-newbie@vger.kernel.org" <linux-newbie@vger.kernel.org>
Subject: Re: How to find out which part of code is changing a particular data structure.
Date: Fri, 08 Nov 2013 16:03:09 -0500	[thread overview]
Message-ID: <y0mhabm7gj6.fsf@fche.csb> (raw)
In-Reply-To: <70853dc9fbf84454b3db81630a6ce99e@BLUPR05MB118.namprd05.prod.outlook.com> (Rajat Jain's message of "Fri, 8 Nov 2013 00:46:13 +0000")

Rajat Jain <rajatjain@juniper.net> writes:

> [...]  I have a memory location (One of the fields in a kernel data
> structure) and I want to track down the code that changes the value
> of that particular location. Some thing like a "watchpoint".

See the register_wide_hw_breakpoint API.  You could write a small
module that runs early, and gets callbacks when a given address is
modified.


> And this is early while I am still booting up. Can some one tell me
> if it is possible to do so?

(Were it not for the 'while still booting up' part, I'd suggest trying
systemtap's 

        probe kernel.data("SYMBOL").write { }
 or     probe kernel.data(0xDEADBEEF).write { }

probes, but we haven't worked through initramfs'ifying the widget.)


- FChE
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

      parent reply	other threads:[~2013-11-08 21:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-08  0:46 How to find out which part of code is changing a particular data structure Rajat Jain
2013-11-08  3:31 ` Chetan Nanda
2013-11-08  7:23   ` kiran kumar
2013-11-08 14:51     ` Valdis.Kletnieks
2013-11-08 21:03 ` Frank Ch. Eigler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=y0mhabm7gj6.fsf@fche.csb \
    --to=fche@redhat.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linux-newbie@vger.kernel.org \
    --cc=rajatjain@juniper.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).